From dcd36c6b4ebe3ef8115113df47cdb4335a63f259 Mon Sep 17 00:00:00 2001 From: hyonun321 Date: Sun, 24 Nov 2024 22:39:58 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=ED=9B=84=20=ED=99=9C=EC=84=B1=ED=99=94=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=20=EB=B6=80=EC=97=AC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 꺼진 페이지까지 다시 isActive 되기때문에 사용자 의도와 맞지 않다고 판단 #184 --- .../src/features/workSpace/hooks/usePagesManage.ts | 12 ------------ 1 file changed, 12 deletions(-) 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; }); },