fix: 결제 성공 페이지에서 orderId를 query param으로도 처리하도록 수정 #413
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.
🔗 관련 이슈
📌 PR 내용
기존: navigate("/purchase/success", { state: { orderId } }) 로 전달된 state만 사용
문제: 백엔드에서 /purchase/success?orderId=xxx 로 리다이렉트할 경우 orderId가 undefined가 됨
해결: state 값 우선 → 없으면 query param(?orderId=)에서 orderId를 가져오도록 로직 개선
두 방식 모두 지원함으로써 프론트/백엔드 모든 흐름 정상 동작
파싱된 orderId가 존재할 때만 API 요청하도록 안정성 강화
orderId 없음 시 에러 처리 추가 가능 (기본 안전장치)
🗣️ 팀원에게 공유할 내용
✅ Check List