Files
ontime/apps/client/src/common/hooks/useIsSmallDevice.ts
T
2025-06-23 15:37:27 +02:00

10 lines
290 B
TypeScript

import { useMemo } from 'react';
import { useOs, useViewportSize } from '@mantine/hooks';
export function useIsSmallDevice(): boolean {
const { width } = useViewportSize();
const os = useOs();
return useMemo(() => (os === 'ios' || os === 'android') && width < 1300, [width, os]);
}