Repository navigation
Feat(client): HASHI-107 예약 상세 조회 및 취소 API 연동 - #91
Merged
Merged
Conversation
chungyo
approved these changes
Jul 13, 2026
chungyo
left a comment
Contributor
There was a problem hiding this comment.
고생하셨어요!!! 전체적인 흐름 잘 확인했습니다!
404/CANCELED 상태 처리, 취소 요청 중 모달 닫힘 방어, 공통 mutation error handler를 활용한 실패 toast 처리가 꼼꼼하게 구현된 것 같아요~
다만 아래 두 가지는 실제 사용자 동작에서 발생할 수 있어 인라인 코멘트로 남겼습니다.
- 빠른 연속 클릭 시 취소 API가 중복 호출될 수 있는 부분
- 취소 성공 후 상세 캐시가 남아 재진입 시 취소 전 화면이 표시될 수 있는 부분
두 부분만 확인 및 보완 부탁드립니다. 이외에는 전반적으로 잘 구현된 것 같습니다! 고생하셨습니다 🙇♀️
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
Jira: HASHI-107
📚 Tasks
accessToken기반 Authorization 헤더 주입 로직 추가message를 사용할 수 있도록requestSuccessResponse추가GET /api/v1/reservations/{reservationId}POST /api/v1/reservations/{reservationId}/cancelmessage로 toast 표시CANCELED) 직접 URL 접근 시NotFoundPage표시🔎 Description
공통 API 처리
request함수는 성공 응답의data만 반환하는 구조였기 때문에, 예약 취소 성공 toast에 필요한 서버 응답message를 사용할 수 없었습니다. 이를 위해 성공 응답 envelope 전체를 반환하는requestSuccessResponse를 추가했습니다.request의 반환 형태는 유지해서 기존 API 호출부의 동작은 변경하지 않았습니다.예약 상세 조회
reservationId이거나 서버에서 404 응답을 내려주는 경우NotFoundPage를 표시합니다. 또한 서버가 취소된 예약(reservationStatus: CANCELED)을 정상 응답하더라도, 상세 화면 표시 대상이 아니므로NotFoundPage로 처리했습니다.createReservationDetailViewModel에서 UI에 필요한 형태로 변환합니다.예약 취소
message를 toast로 표시한 뒤, 예약 정보 페이지의 진행 중 탭(/my-reservations?status=IN_PROGRESS)으로 이동합니다.취소하기와닫기버튼을 모두 비활성화하고, 모달 닫힘 요청도 무시하도록 처리해 중복 요청과 중간 닫힘을 방지했습니다.구조 정리
api: 서버 요청 함수hooks: React Query query/mutation hook 및 페이지 상태 hookutils/createReservationDetailViewModel: API 응답을 UI view model로 변환utils/reservationDetailPolicy: route param 검증 및 상세 접근 정책 처리불필요해진 mock 데이터 파일은 제거했습니다.
✅ Verification
pnpm --filter @hashi/client testpnpm --filter @hashi/client typecheckpnpm --filter @hashi/client lintgit diff --check👀 To Reviewer
NotFoundPage로 처리했습니다.📸 Screenshot
2026-07-13.3.27.17.mov