umami/src/components/hooks/useMobile.ts
Francis Cao 6eefb4173c
Some checks failed
Node.js CI / build (postgresql, 18.18, 10) (push) Has been cancelled
add improved truncation between tablets and phones
2025-10-27 13:54:15 -07:00

9 lines
279 B
TypeScript

import { useBreakpoint } from '@umami/react-zen';
export function useMobile() {
const breakpoint = useBreakpoint();
const isMobile = ['xs', 'sm', 'md'].includes(breakpoint);
const isPhone = ['xs', 'sm'].includes(breakpoint);
return { breakpoint, isMobile, isPhone };
}