ui update progress
This commit is contained in:
@@ -17,9 +17,12 @@ export default function useWindowDimensions() {
|
||||
function handleResize() {
|
||||
setWindowDimensions(getWindowDimensions());
|
||||
}
|
||||
|
||||
window.addEventListener("orientationchange", handleResize)
|
||||
window.addEventListener("resize", handleResize);
|
||||
return () => window.removeEventListener("resize", handleResize);
|
||||
return () => {
|
||||
window.removeEventListener('resize', handleResize)
|
||||
window.removeEventListener('orientationchange', handleResize)
|
||||
}
|
||||
}, []);
|
||||
|
||||
return windowDimensions;
|
||||
|
||||
Reference in New Issue
Block a user