pl-fe: improve stuff sorry for not descriptive commit messages

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-08-24 21:11:27 +02:00
parent 44d5ca5da6
commit 7039f36406
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,8 @@
import { LAYOUT_BREAKPOINT } from 'pl-fe/is-mobile';
import { useScreenWidth } from './use-screen-width';
export function useIsMobile() {
const screenWidth = useScreenWidth();
return screenWidth <= 581;
return screenWidth <= LAYOUT_BREAKPOINT;
}

View File

@ -1,5 +1,5 @@
/** Breakpoint at which the application is considered "mobile". */
const LAYOUT_BREAKPOINT = 630;
const LAYOUT_BREAKPOINT = 581;
/** Check if the width is small enough to be considered "mobile". */
const isMobile = (width: number) => width <= LAYOUT_BREAKPOINT;
@ -12,4 +12,4 @@ const userTouching = window.matchMedia('(pointer: coarse)');
/** Whether the device is iOS (best guess). */
const isIOS = (): boolean => iOS;
export { isMobile, userTouching, isIOS };
export { LAYOUT_BREAKPOINT, isMobile, userTouching, isIOS };