Skip to content

Commit

Permalink
[FE] 기존 체크리스트 스토어 스토리지를 localStorage 에서 sessionStorage로 변경한다. (#1046)
Browse files Browse the repository at this point in the history
  • Loading branch information
healim01 authored Dec 8, 2024
1 parent f28e2d1 commit eef4710
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/store/roomInfoNonValidatedStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const roomInfoNonValidatedStore = createStore<States & { actions: Actions }>()(
}),
{
name: 'roomInfo-nonvalidated',
getStorage: () => sessionStorage,
partialize: store => {
const { actions: _, ...state } = store;
return { ...state };
Expand Down
1 change: 1 addition & 0 deletions frontend/src/store/roomInfoStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const roomInfoStore = createStore<RoomInfoState & { actions: RoomInfoActi
}),
{
name: 'roomInfo',
getStorage: () => sessionStorage,
partialize: state => {
const { actions: _, ...roomInfo } = state;
return { ...roomInfo };
Expand Down
1 change: 1 addition & 0 deletions frontend/src/store/useChecklistStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const useChecklistStore = create<ChecklistState>()(
}),
{
name: 'checklist-answer',
getStorage: () => sessionStorage,
partialize: ({ checklistCategoryQnA, categories }) => ({
checklistCategoryQnA,
categories,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/store/useSelectedOptionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const useSelectedOptionStore = create<OptionState & { actions: OptionAction }>()
}),
{
name: 'checklist-answer-option',
getStorage: () => sessionStorage,
partialize: state => ({
selectedOptions: state.selectedOptions,
// actions는 저장하지 않음
Expand Down

0 comments on commit eef4710

Please sign in to comment.