import { Breakpoint, useMediaQuery, useTheme } from "@mui/material"; const useIsMobile = (breakpoint: Breakpoint = "sm") => { const theme = useTheme(); const matches = useMediaQuery(theme.breakpoints.up(breakpoint)); return !matches; }; export default useIsMobile;