Skip to content

Commit

Permalink
Remove breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariful Alam committed Apr 23, 2021
1 parent 03e0cdf commit 4701f1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/js/client/common/hooks/IsMobile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';

export const useIsMobile = (breakPoint = 768) => {
export const useIsMobile = () => {
const [width, setWidth] = useState(window.innerWidth);

useEffect(() => {
Expand All @@ -9,5 +9,5 @@ export const useIsMobile = (breakPoint = 768) => {
return () => window.removeEventListener("resize", handleWindowResize);
}, []);

return width <= breakPoint;
return width <= 768;
}

0 comments on commit 4701f1e

Please sign in to comment.