This commit is contained in:
Vyacheslav Matyukhin 2022-07-23 22:03:50 +04:00
parent ce31dc62c2
commit 111b4975ee
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C
2 changed files with 16 additions and 14 deletions

View File

@ -3,13 +3,15 @@ import { RefreshIcon } from "@heroicons/react/solid";
import styles from "./FallbackSpinner.module.css";
export const FallbackSpinner = ({ height }) => {
const [show, setShow] = useState(false);
useEffect(() => {
setTimeout(() => {
setShow(true);
}, 500);
}, []);
return <div className={styles.container} style={{height}}>{
show ? <RefreshIcon className={styles.icon} /> : null
}</div>;
const [show, setShow] = useState(false);
useEffect(() => {
setTimeout(() => {
setShow(true);
}, 500);
}, []);
return (
<div className={styles.container} style={{ height }}>
{show ? <RefreshIcon className={styles.icon} /> : null}
</div>
);
};

View File

@ -1,9 +1,9 @@
.container {
/* height must be set explicitly */
width: 100%;
display: flex;
align-items: center;
justify-content: center;
/* height must be set explicitly */
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.icon {