From f299a2ce1797880dc65ef703ee29b7ea2033e227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=89=E1=85=A9=E1=86=AB=E1=84=8C=E1=85=B5=E1=86=AB?= =?UTF-8?q?=E1=84=8B=E1=85=A7=E1=86=BC?= Date: Fri, 25 Oct 2024 10:04:08 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=92=A4=EB=A1=9C=EA=B0=80=EA=B8=B0=20?= =?UTF-8?q?=EB=A7=89=EA=B8=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/travelPlanEdit/TravelPlanEditPage.tsx | 6 ------ .../travelPlanRegister/TravelPlanRegisterPage.tsx | 11 ----------- .../pages/travelogueEdit/TravelogueEditPage.tsx | 6 ------ .../travelogueRegister/TravelogueRegisterPage.tsx | 6 ------ 4 files changed, 29 deletions(-) diff --git a/frontend/src/components/pages/travelPlanEdit/TravelPlanEditPage.tsx b/frontend/src/components/pages/travelPlanEdit/TravelPlanEditPage.tsx index 01e842c1..1761a6e2 100644 --- a/frontend/src/components/pages/travelPlanEdit/TravelPlanEditPage.tsx +++ b/frontend/src/components/pages/travelPlanEdit/TravelPlanEditPage.tsx @@ -18,7 +18,6 @@ import { useTravelPlanInitialization } from "@components/pages/travelPlanEdit/ho import TravelPlanDayAccordion from "@components/pages/travelPlanRegister/TravelPlanDayAccordion/TravelPlanDayAccordion"; import useTravelPlanFormState from "@hooks/pages/useTravelPlanFormState/useTravelPlanFormState"; -import usePrompt from "@hooks/usePrompt"; import useToggle from "@hooks/useToggle"; import { ERROR_MESSAGE_MAP } from "@constants/errorMessage"; @@ -70,11 +69,6 @@ const TravelPlanEditPage = () => { const navigate = useNavigate(); - usePrompt({ - message: "사이트에서 나가시겠습니까?", - when: ({ currentLocation, nextLocation }) => currentLocation.pathname !== nextLocation.pathname, - }); - useBeforeUnload((event) => { event.preventDefault(); }); diff --git a/frontend/src/components/pages/travelPlanRegister/TravelPlanRegisterPage.tsx b/frontend/src/components/pages/travelPlanRegister/TravelPlanRegisterPage.tsx index 7b33975e..7d23ee78 100644 --- a/frontend/src/components/pages/travelPlanRegister/TravelPlanRegisterPage.tsx +++ b/frontend/src/components/pages/travelPlanRegister/TravelPlanRegisterPage.tsx @@ -20,7 +20,6 @@ import useTravelPlanRegister from "@components/pages/travelPlanRegister/hooks/us import useTravelPlanFormState from "@hooks/pages/useTravelPlanFormState/useTravelPlanFormState"; import useAuthRedirect from "@hooks/useAuthRedirect"; -import usePrompt from "@hooks/usePrompt"; import useToggle from "@hooks/useToggle"; import { CYPRESS_DATA_MAP } from "@constants/cypress"; @@ -72,18 +71,8 @@ const TravelPlanRegisterPage = () => { handleBottomSheetClose, ); - usePrompt({ - message: "사이트에서 나가시겠습니까?", - when: ({ currentLocation, nextLocation }) => currentLocation.pathname !== nextLocation.pathname, - }); - useAuthRedirect(); - usePrompt({ - message: "사이트에서 나가시겠습니까?", - when: ({ currentLocation, nextLocation }) => currentLocation.pathname !== nextLocation.pathname, - }); - useBeforeUnload((event) => { event.preventDefault(); }); diff --git a/frontend/src/components/pages/travelogueEdit/TravelogueEditPage.tsx b/frontend/src/components/pages/travelogueEdit/TravelogueEditPage.tsx index de9959f5..6fef30f8 100644 --- a/frontend/src/components/pages/travelogueEdit/TravelogueEditPage.tsx +++ b/frontend/src/components/pages/travelogueEdit/TravelogueEditPage.tsx @@ -20,7 +20,6 @@ import TravelogueDayAccordion from "@components/pages/travelogueRegister/Travelo import useTravelogueFormState from "@hooks/pages/useTravelogueFormState/useTravelogueFormState"; import { useDragScroll } from "@hooks/useDragScroll"; -import usePrompt from "@hooks/usePrompt"; import useToggle from "@hooks/useToggle"; import useUnmountAnimation from "@hooks/useUnmountAnimation"; @@ -81,11 +80,6 @@ const TravelogueEditPage = () => { handleInitializeThumbnail, }); - usePrompt({ - message: "사이트에서 나가시겠습니까?", - when: ({ currentLocation, nextLocation }) => currentLocation.pathname !== nextLocation.pathname, - }); - useBeforeUnload((event) => { event.preventDefault(); }); diff --git a/frontend/src/components/pages/travelogueRegister/TravelogueRegisterPage.tsx b/frontend/src/components/pages/travelogueRegister/TravelogueRegisterPage.tsx index 6d749dd3..4d654fc2 100644 --- a/frontend/src/components/pages/travelogueRegister/TravelogueRegisterPage.tsx +++ b/frontend/src/components/pages/travelogueRegister/TravelogueRegisterPage.tsx @@ -22,7 +22,6 @@ import useTravelogueRegister from "@components/pages/travelogueRegister/hooks/us import useTravelogueFormState from "@hooks/pages/useTravelogueFormState/useTravelogueFormState"; import useAuthRedirect from "@hooks/useAuthRedirect"; import { useDragScroll } from "@hooks/useDragScroll"; -import usePrompt from "@hooks/usePrompt"; import useToggle from "@hooks/useToggle"; import { FORM_VALIDATIONS_MAP } from "@constants/formValidation"; @@ -60,11 +59,6 @@ const TravelogueRegisterPage = () => { isEnabledForm, } = useTravelogueFormState(transformDetail?.days ?? []); - usePrompt({ - message: "사이트에서 나가시겠습니까?", - when: ({ currentLocation, nextLocation }) => currentLocation.pathname !== nextLocation.pathname, - }); - useBeforeUnload((event) => { event.preventDefault(); });