Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] - 뒤로가기 막기 제거 #597

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading