manifold/web/hooks/use-is-mobile.ts

7 lines
157 B
TypeScript
Raw Normal View History

2022-09-16 15:28:39 +00:00
import { useWindowSize } from 'web/hooks/use-window-size'
export function useIsMobile() {
const { width } = useWindowSize()
return (width ?? 0) < 600
2022-09-16 15:30:09 +00:00
}