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:
parent
b64ddcf5ce
commit
4853143d26
2 changed files with 21 additions and 9 deletions
8
src/utils/hooks/useResizeHandler.ts
Normal file
8
src/utils/hooks/useResizeHandler.ts
Normal 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]);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue