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

fixed image loading at preloader

This commit is contained in:
Fedor Katurov 2021-06-25 16:39:41 +07:00
parent f2c4026c5c
commit 02bc12f727

View file

@ -24,7 +24,7 @@ const ImagePreloader: FC<IProps> = ({ file, onLoad, onClick, className }) => {
const [hasError, setHasError] = useState(false); const [hasError, setHasError] = useState(false);
const onImageLoad = useCallback(() => { const onImageLoad = useCallback(() => {
setLoaded(false); setLoaded(true);
setHasError(false); setHasError(false);
if (onLoad) { if (onLoad) {