|
|
@@ -11,34 +11,34 @@ const { useBreakpoint } = Grid;
|
|
|
*/
|
|
|
const useEffectiveBreakpoint = () => {
|
|
|
const screens = useBreakpoint();
|
|
|
- const [isForcedLarge, setIsForcedLarge] = useState(false);
|
|
|
-
|
|
|
- useEffect(() => {
|
|
|
- const handleResize = () => {
|
|
|
- // Check if window width is less than the min-width (1700px)
|
|
|
- // We use a slightly smaller buffer or exact match depending on needs,
|
|
|
- // but strictly < 1700 matches the CSS min-width logic.
|
|
|
- setIsForcedLarge(window.innerWidth < 1700);
|
|
|
- };
|
|
|
-
|
|
|
- // Initial check
|
|
|
- handleResize();
|
|
|
-
|
|
|
- window.addEventListener('resize', handleResize);
|
|
|
- return () => window.removeEventListener('resize', handleResize);
|
|
|
- }, []);
|
|
|
-
|
|
|
- if (isForcedLarge) {
|
|
|
- // Return a breakpoint object that mimics a very large screen
|
|
|
- return {
|
|
|
- xs: true,
|
|
|
- sm: true,
|
|
|
- md: true,
|
|
|
- lg: true,
|
|
|
- xl: true,
|
|
|
- xxl: true,
|
|
|
- };
|
|
|
- }
|
|
|
+ // const [isForcedLarge, setIsForcedLarge] = useState(false);
|
|
|
+
|
|
|
+ // useEffect(() => {
|
|
|
+ // const handleResize = () => {
|
|
|
+ // // Check if window width is less than the min-width (1700px)
|
|
|
+ // // We use a slightly smaller buffer or exact match depending on needs,
|
|
|
+ // // but strictly < 1700 matches the CSS min-width logic.
|
|
|
+ // setIsForcedLarge(window.innerWidth < 1700);
|
|
|
+ // };
|
|
|
+
|
|
|
+ // // Initial check
|
|
|
+ // handleResize();
|
|
|
+
|
|
|
+ // window.addEventListener('resize', handleResize);
|
|
|
+ // return () => window.removeEventListener('resize', handleResize);
|
|
|
+ // }, []);
|
|
|
+
|
|
|
+ // if (isForcedLarge) {
|
|
|
+ // // Return a breakpoint object that mimics a very large screen
|
|
|
+ // return {
|
|
|
+ // xs: true,
|
|
|
+ // sm: true,
|
|
|
+ // md: true,
|
|
|
+ // lg: true,
|
|
|
+ // xl: true,
|
|
|
+ // xxl: true,
|
|
|
+ // };
|
|
|
+ // }
|
|
|
|
|
|
return screens;
|
|
|
};
|