Skip to content

Commit

Permalink
fix: 뒤로가기 막기 제거 (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyoung234 authored Oct 25, 2024
1 parent 3ba0579 commit c08899d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -70,11 +69,6 @@ const TravelPlanEditPage = () => {

const navigate = useNavigate();

usePrompt({
message: "사이트에서 나가시겠습니까?",
when: ({ currentLocation, nextLocation }) => currentLocation.pathname !== nextLocation.pathname,
});

useBeforeUnload((event) => {
event.preventDefault();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -81,11 +80,6 @@ const TravelogueEditPage = () => {
handleInitializeThumbnail,
});

usePrompt({
message: "사이트에서 나가시겠습니까?",
when: ({ currentLocation, nextLocation }) => currentLocation.pathname !== nextLocation.pathname,
});

useBeforeUnload((event) => {
event.preventDefault();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -60,11 +59,6 @@ const TravelogueRegisterPage = () => {
isEnabledForm,
} = useTravelogueFormState(transformDetail?.days ?? []);

usePrompt({
message: "사이트에서 나가시겠습니까?",
when: ({ currentLocation, nextLocation }) => currentLocation.pathname !== nextLocation.pathname,
});

useBeforeUnload((event) => {
event.preventDefault();
});
Expand Down

0 comments on commit c08899d

Please sign in to comment.