Skip to content

Commit

Permalink
fix: update isMobile function
Browse files Browse the repository at this point in the history
  • Loading branch information
vault-developer committed Nov 22, 2024
1 parent 3544005 commit ed15f5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export const SCREEN_WIDTH = {
SM: 640,
};
export const MIN_DESKTOP_WIDTH = 768;
4 changes: 2 additions & 2 deletions src/utils/isMobile.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { SCREEN_WIDTH } from './constants';
import { MIN_DESKTOP_WIDTH } from './constants';

export const isMobile = () => window.innerWidth < SCREEN_WIDTH.SM;
export const isMobile = () => window.innerWidth < MIN_DESKTOP_WIDTH;

0 comments on commit ed15f5e

Please sign in to comment.