diff --git a/client/src/features/workSpace/hooks/usePagesManage.ts b/client/src/features/workSpace/hooks/usePagesManage.ts index c6dc1961..6f45be12 100644 --- a/client/src/features/workSpace/hooks/usePagesManage.ts +++ b/client/src/features/workSpace/hooks/usePagesManage.ts @@ -35,19 +35,7 @@ export const usePagesManage = (workspace: WorkSpace | null, clientId: number | n }); setPages((prevPages) => { - const deletedPage = prevPages.find((page) => page.id === operation.pageId); const remainingPages = prevPages.filter((page) => page.id !== operation.pageId); - - // 삭제된 페이지가 활성화된 상태였다면, 다른 페이지를 활성화 - if (deletedPage?.isActive && remainingPages.length > 0) { - const nextActiveIndex = 0; // 첫 번째 페이지를 활성화하거나, 다른 로직으로 선택 - remainingPages[nextActiveIndex] = { - ...remainingPages[nextActiveIndex], - isActive: true, - isVisible: true, - }; - } - return remainingPages; }); },