[cherry-pick] 마이페이지 계정 탈퇴 API 연동#702
Conversation
…정 탈퇴 API 연동 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eError 경유로 통일 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough클래스 탈퇴 기능을 구현하는 PR입니다. 새 mutation 훅 Changes클래스 탈퇴 흐름
Sequence DiagramsequenceDiagram
participant User as 사용자
participant Modal as WithdrawalConfirmModal
participant Mutation as useWithdrawMemberMutation
participant API as DELETE /mypage/class/withdraw
participant Auth as clearClientAuthStateAndRedirect
participant Sentry as Sentry
User->>Modal: 탈퇴하기 클릭 (handleConfirm)
Modal->>Mutation: withdraw()
Mutation->>API: delete (agreedToClassWithdrawalNotice: true)
alt 성공
API-->>Mutation: 200 OK
Mutation->>Auth: clearClientAuthStateAndRedirect(LANDING)
Auth-->>User: 랜딩 페이지로 리다이렉트
else 실패
API-->>Mutation: Error
Mutation->>Sentry: sendErrorToSentry
Mutation->>Modal: showToast (error)
Modal-->>User: 에러 메시지 표시
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
개요
마이페이지 프로필의 계정 탈퇴 버튼에 실제 API를 연동합니다.
DELETE /api/v6/mypage/class/withdraw호출 후 성공 시 모든 클라이언트 상태(쿠키, Zustand, QueryCache)를 초기화하고 랜딩 페이지로 리다이렉트합니다. 에러 핸들링은 hook 레벨onError에서 처리해 global MutationCache와 중복 토스트가 발생하지 않도록 합니다.원본 PR
fix/withdrawalCherry-pick 대상 커밋
06816c3— [withdrawal] fix : feat(my-page): 계정 탈퇴 API 연동e2195ec— [withdrawal] fix : 탈퇴 에러 핸들링 analyzeError 경유로 통일변경 파일
src/hooks/queries/user/use-withdraw-member-mutation.ts— 계정 탈퇴 mutation hook 신규 추가 (DELETE API 연동, analyzeError 경유 에러 처리)src/app/(service)/(my)/my-page/_components/withdrawal-confirm-modal.tsx— mutation 연동, isPending 중 취소/탈퇴 버튼 disabled 처리혼입 검증 결과
각 커밋의
--stat확인 결과:withdrawal-confirm-modal.tsx+use-withdraw-member-mutation.ts2개 파일만 변경use-withdraw-member-mutation.ts1개 파일만 변경Test plan
/) 리다이렉트, 로그인 상태 해제 확인🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes