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.
2 parents afefa00 + a548ffb commit b57ca50Copy full SHA for b57ca50
resources/js/hooks/use-mobile.tsx
@@ -1,10 +1,9 @@
1
-import * as React from 'react';
2
-import { useEffect } from 'react';
+import { useEffect, useState } from 'react';
3
4
const MOBILE_BREAKPOINT = 768;
5
6
export function useIsMobile() {
7
- const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);
+ const [isMobile, setIsMobile] = useState<boolean | undefined>(undefined);
8
9
useEffect(() => {
10
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
0 commit comments