Skip to content

Commit

Permalink
feat: localStorage -> sessionStorage 로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
healim01 committed Dec 4, 2024
1 parent 7061255 commit 4896548
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 4896548

Please sign in to comment.