fix "useBreakpoint" hook

This commit is contained in:
2025-10-05 21:14:48 +03:00
parent c374f2214b
commit ab2a1fdb74

View File

@@ -3,12 +3,11 @@ import { Grid } from "antd";
const { useBreakpoint } = Grid;
export default function useBreakPoint() {
const { xs, sm, md } = useBreakpoint();
if (xs)
const { sm, md, lg, xl, xxl } = useBreakpoint();
if (lg || xl || xxl)
return {
isDesktop: false,
isMobile: true,
isDesktop: true,
isMobile: false,
isTablet: false,
};
if (md || sm)
@@ -18,8 +17,8 @@ export default function useBreakPoint() {
isTablet: true,
};
return {
isDesktop: true,
isMobile: false,
isDesktop: false,
isMobile: true,
isTablet: false,
};
}