[FE] 이벤트 계좌번호 수정을 url로 진입할 경우 에러 발생하는 문제 해결 #866
Merged
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.
issue
구현 사항
EditAccount에서 event 정보를 api로 불러오지 않고 navigate state로 전달 받도록 수정
Event api가 SuspenseQuery로 구현되어있어 이를 외부에서 Suspense로 감싸줘야 하지만 router에서 EditAccount는 이벤트 로더 바깥에 있어서 감싸있지 않기 때문에 발생한 에러였습니다. 그래서 EditAccountPage에서 event를 api로 요청하지 않고 계좌번호 정보를 navigate state로 받도록 수정했습니다.
주소 창에 admin/edit-account로 입력한 것은 의도하지 않은 방법으로 들어왔다고 생각하기 때문에 다시 admin 페이지로 돌리는 기능도 넣었어요
🫡 참고사항