prettify
This commit is contained in:
parent
ce31dc62c2
commit
111b4975ee
|
@ -3,13 +3,15 @@ import { RefreshIcon } from "@heroicons/react/solid";
|
||||||
import styles from "./FallbackSpinner.module.css";
|
import styles from "./FallbackSpinner.module.css";
|
||||||
|
|
||||||
export const FallbackSpinner = ({ height }) => {
|
export const FallbackSpinner = ({ height }) => {
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setShow(true);
|
setShow(true);
|
||||||
}, 500);
|
}, 500);
|
||||||
}, []);
|
}, []);
|
||||||
return <div className={styles.container} style={{height}}>{
|
return (
|
||||||
show ? <RefreshIcon className={styles.icon} /> : null
|
<div className={styles.container} style={{ height }}>
|
||||||
}</div>;
|
{show ? <RefreshIcon className={styles.icon} /> : null}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.container {
|
.container {
|
||||||
/* height must be set explicitly */
|
/* height must be set explicitly */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user