Skip to content

Commit

Permalink
feat: navigate replace true 조건으로 입력 중 상태로 되돌아갈 수 없도록 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhokim98 committed Aug 16, 2024
1 parent 1a107d2 commit 0b57939
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/pages/CreateEventPage/SetEventNamePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const SetEventNamePage = () => {
const submitEventName = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();

navigate(ROUTER_URLS.eventCreatePassword, {state: {eventName}});
navigate(ROUTER_URLS.eventCreatePassword, {state: {eventName}, replace: true});
};

return (
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/CreateEventPage/SetEventPasswordPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const SetEventPasswordPage = () => {
const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
const eventId = await submitPassword(event);

navigate(`${ROUTER_URLS.eventCreateComplete}?${new URLSearchParams({eventId})}`);
navigate(`${ROUTER_URLS.eventCreateComplete}?${new URLSearchParams({eventId})}`, {replace: true});
};

return (
Expand Down

0 comments on commit 0b57939

Please sign in to comment.