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

fixed default width and height for file loader

This commit is contained in:
Fedor Katurov 2021-06-23 14:55:37 +07:00
parent b64ddcf5ce
commit 4853143d26
2 changed files with 21 additions and 9 deletions

View file

@ -0,0 +1,8 @@
import { useEffect } from 'react';
export const useResizeHandler = (onResize: () => any) => {
useEffect(() => {
window.addEventListener('resize', onResize);
return () => window.removeEventListener('resize', onResize);
}, [onResize]);
};