ui update progress

This commit is contained in:
DmitriyB
2023-03-07 15:59:17 +05:00
parent 4107a85a4d
commit 240f28935d
20 changed files with 155 additions and 31 deletions
+5 -2
View File
@@ -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;