[fix] 배포 환경에서 모임 생성 성공 후 redirect 시 브라우저 이탈 경고 노출 - #252
Merged
Conversation
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Summary
배포 환경에서 모임 생성 성공 후 redirect 시 브라우저 기본 이탈 경고가 노출되던 문제를 수정했습니다.
📄 Tasks
기존에는 작성 여부(
isDirty)를 기준으로 모든 이탈 가드를 동일하게 처리하고 있어,모임 생성 제출 직후
isPending상태에서 페이지 이동이 발생할 때도 브라우저 unload 경고가 함께 노출되고 있었습니다.해결하기 위해 leave guard 조건을 분리했습니다.
isDirtyshouldBlockBeforeUnload제출 진행 중(
isPending)에는beforeunload만 비활성화하여,작성 중 뒤로가기 가드는 유지하면서 정상적인 생성 완료 redirect 시 경고가 뜨지 않도록 수정했습니다.
useMoimCreateLeaveGuardshouldBlockBeforeUnload옵션 추가beforeunload조건을isDirty와 분리MoimCreateFormshouldBlockBeforeUnload: form.formState.isDirty && !isPending적용👀 To Reviewer
📸 Screenshot