Skip to content

Commit 94ca108

Browse files
authored
Merge pull request #91 from boostcampwm-2024/bug-fe-#75
fix: 페이지 삭제시 에디터 내용이 바뀌지 않는 문제
2 parents 3a20a2c + 08df8e0 commit 94ca108

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

frontend/src/hooks/useNoteList.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const useNoteList = () => {
2828

2929
deleteMutation.mutate({ id: noteIdToDelete });
3030
setIsModalOpen(false);
31+
setCurrentPage(null);
3132
};
3233

3334
const onCloseModal = () => {

frontend/src/store/usePageStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { create } from "zustand";
22

33
interface PageStore {
44
currentPage: number | null;
5-
setCurrentPage: (currentPage: number) => void;
5+
setCurrentPage: (currentPage: number | null) => void;
66
}
77

88
const usePageStore = create<PageStore>((set) => ({
99
currentPage: null,
10-
setCurrentPage: (currentPage: number) => set({ currentPage }),
10+
setCurrentPage: (currentPage: number | null) => set({ currentPage }),
1111
}));
1212

1313
export default usePageStore;

0 commit comments

Comments
 (0)