We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b8669a commit afefa00Copy full SHA for afefa00
resources/js/hooks/use-mobile.tsx
@@ -1,11 +1,12 @@
1
import * as React from 'react';
2
+import { useEffect } from 'react';
3
4
const MOBILE_BREAKPOINT = 768;
5
6
export function useIsMobile() {
7
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);
8
- React.useEffect(() => {
9
+ useEffect(() => {
10
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
11
12
const onChange = () => {
0 commit comments