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:
parent
73f970b82c
commit
2d9d88f1a1
7 changed files with 40 additions and 13 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue