refactor: share mobile breakpoint handling
This commit is contained in:
1 parent
322d4a7fc4
commit
7e420bc087
5 files changed
+113
-144
No files matched your search
@@ -1 +1,2 @@
|
||||
export * from "./use-is-mobile";
|
||||
export * from "./use-translated-mantine-react-table";
|
||||
@@ -0,0 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { useMantineTheme } from "@mantine/core";
|
||||
import { useMediaQuery } from "@mantine/hooks";
|
||||
|
||||
export const useIsMobile = () => {
|
||||
const theme = useMantineTheme();
|
||||
return useMediaQuery(`(max-width: ${theme.breakpoints.sm})`);
|
||||
};
|
||||
Reference in new issue
Block a user