2022-07-23 17:44:08 +00:00
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
import { RefreshIcon } from "@heroicons/react/solid";
|
|
|
|
import styles from "./FallbackSpinner.module.css";
|
|
|
|
|
|
|
|
export const FallbackSpinner = ({ height }) => {
|
2022-07-23 18:17:04 +00:00
|
|
|
const [show, setShow] = useState(/* false */ true);
|
2022-07-23 18:03:50 +00:00
|
|
|
useEffect(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
setShow(true);
|
|
|
|
}, 500);
|
|
|
|
}, []);
|
|
|
|
return (
|
|
|
|
<div className={styles.container} style={{ height }}>
|
|
|
|
{show ? <RefreshIcon className={styles.icon} /> : null}
|
|
|
|
</div>
|
|
|
|
);
|
2022-07-23 17:44:08 +00:00
|
|
|
};
|