From 074978f5a7a652e54cbcaf591b0931b36425e5e0 Mon Sep 17 00:00:00 2001 From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com> Date: Sat, 27 Jul 2024 23:29:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20recoil-persist=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/atoms/atom.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/atoms/atom.ts b/src/atoms/atom.ts index cdd05ea2..066f705d 100644 --- a/src/atoms/atom.ts +++ b/src/atoms/atom.ts @@ -1,7 +1,7 @@ -import { DateStates, ScheduleStates, TimeStates } from 'pages/legacy/selectSchedule/types/Schedule'; - import { PreferTime } from 'components/legacy/scheduleComponents/types/AvailableScheduleType'; +import { DateStates, ScheduleStates } from 'pages/legacy/selectSchedule/types/Schedule'; import { atom } from 'recoil'; +import { recoilPersist } from 'recoil-persist'; export const methodStateAtom = atom({ key: 'methodStateAtom', @@ -41,7 +41,10 @@ export const clickedTimeSlotAtom = atom({ default: undefined, }); +const { persistAtom } = recoilPersist(); + export const userNameAtom = atom({ key: 'userNameAtom', default: '', + effects_UNSTABLE: [persistAtom], });