1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

(nextjs) added node preloader

This commit is contained in:
Fedor Katurov 2022-01-17 18:27:31 +07:00
parent 73f970b82c
commit 2d9d88f1a1
7 changed files with 40 additions and 13 deletions

View file

@ -21,7 +21,7 @@ const DEFAULT_WIDTH = 1920;
const DEFAULT_HEIGHT = 1020;
const ImagePreloader: FC<IProps> = ({ file, color, onLoad, onClick, className }) => {
const [maxHeight, setMaxHeight] = useState(window.innerHeight - 140);
const [maxHeight, setMaxHeight] = useState(0);
const [loaded, setLoaded] = useState(false);
const [hasError, setHasError] = useState(false);