The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add local storage effect to save sidebar state (#13591)
Félix Malfait2c87c6fc1b6d
diff --git a/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.ts b/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.tsindex 390e883b814..84de68556d3 100644--- a/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.ts+++ b/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.ts@@ -1,9 +1,11 @@import { atom } from 'recoil';import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { localStorageEffect } from '~/utils/recoil-effects';const isMobile = window.innerWidth <= MOBILE_VIEWPORT;export const isNavigationDrawerExpandedState = atom({key: 'isNavigationDrawerExpanded',default: !isMobile,+ effects: [localStorageEffect()],});