fix: 고객 전용 기능 역할 판별 보완 - #58
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough인증 준비 훅은 명시적 Changes고객 인증 흐름
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
9g-g9
reviewed
Aug 3, 2026
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.
📋 작업 내용
!MOVER제외 방식에서role === "CUSTOMER"명시 확인으로 변경했습니다.🔥 변경 사항
useCustomerAuthReady:canFetch를!isPending && isAuthenticated && isCustomer로 변경하고isCustomer를 반환합니다.CustomerAuthGate: CUSTOMER가 아닌 로그인 사용자를getRoleHomePath(user?.role)로 리다이렉트합니다. (ADMIN 홈은 기존 임시 정책 유지)src/hooks/useCustomerAuthReady.ts,src/components/auth/CustomerAuthGate.tsx✅ 체크리스트
📷 스크린샷 (선택)
UI 변경 없음
🔗 관련 이슈
Closes #
💬 To Reviewer
canFetch가 이제 CUSTOMER일 때만 true입니다. 견적/리뷰 Queryenabled는 기존처럼canFetch를 쓰므로 Hook 개별 수정은 없습니다.getRoleHomePath의 임시 정책(기사님 찾기)을 그대로 사용했습니다. 관리자 전용 홈이 정해지면 redirect 쪽만 조정하면 됩니다.Summary by CodeRabbit