@@ -2,26 +2,26 @@ import { useEffect, useState } from "react";
22
33const useWindowDimensions = ( ) => {
44 const [ windowDimensions , setWindowDimensions ] = useState ( {
5- width : window . outerWidth ,
6- height : window . outerHeight ,
5+ width : window . innerWidth ,
6+ height : window . innerHeight ,
77 widthConditions : {
8- isMobile : window . outerWidth < 768 ,
9- isTablet : window . outerWidth < 1280 ,
10- isLaptop : window . outerWidth < 1920 ,
11- isDesktop : window . outerWidth >= 1920 ,
8+ isMobile : window . innerWidth < 768 ,
9+ isTablet : window . innerWidth < 1280 ,
10+ isLaptop : window . innerWidth < 1920 ,
11+ isDesktop : window . innerWidth >= 1920 ,
1212 } ,
1313 } ) ;
1414
1515 useEffect ( ( ) => {
1616 const handleResize = ( ) => {
1717 setWindowDimensions ( {
18- width : window . outerWidth ,
19- height : window . outerHeight ,
18+ width : window . innerWidth ,
19+ height : window . innerHeight ,
2020 widthConditions : {
21- isMobile : window . outerWidth < 768 ,
22- isTablet : window . outerWidth < 1280 ,
23- isLaptop : window . outerWidth < 1920 ,
24- isDesktop : window . outerWidth >= 1920 ,
21+ isMobile : window . innerWidth < 768 ,
22+ isTablet : window . innerWidth < 1280 ,
23+ isLaptop : window . innerWidth < 1920 ,
24+ isDesktop : window . innerWidth >= 1920 ,
2525 } ,
2626 } ) ;
2727 } ;
0 commit comments