diff --git a/src/atoms/atom.ts b/src/atoms/atom.ts index 973d8dc3..a425b905 100644 --- a/src/atoms/atom.ts +++ b/src/atoms/atom.ts @@ -1,5 +1,7 @@ + import { ScheduleStates } from 'pages/legacy/selectSchedule/types/Schedule'; import { atom } from 'recoil'; +import { recoilPersist } from 'recoil-persist'; export const methodStateAtom = atom({ key: 'methodStateAtom', @@ -29,7 +31,10 @@ export const clickedTimeSlotAtom = atom({ default: undefined, }); +const { persistAtom } = recoilPersist(); + export const userNameAtom = atom({ key: 'userNameAtom', default: '', + effects_UNSTABLE: [persistAtom], });