Skip to content

Commit afefa00

Browse files
committed
refactor: shorten import
1 parent 8b8669a commit afefa00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/js/hooks/use-mobile.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import * as React from 'react';
2+
import { useEffect } from 'react';
23

34
const MOBILE_BREAKPOINT = 768;
45

56
export function useIsMobile() {
67
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);
78

8-
React.useEffect(() => {
9+
useEffect(() => {
910
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
1011

1112
const onChange = () => {

0 commit comments

Comments
 (0)