mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 17:33:55 +00:00
10 lines
290 B
TypeScript
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]);
|
|
}
|