Files
twenty/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerOpenState.ts
2023-12-10 18:10:54 +01:00

11 lines
260 B
TypeScript

import { atom } from 'recoil';
import { MOBILE_VIEWPORT } from '@/ui/theme/constants/theme';
const isMobile = window.innerWidth <= MOBILE_VIEWPORT;
export const isNavigationDrawerOpenState = atom({
key: 'isNavigationDrawerOpen',
default: !isMobile,
});