20250916 #6 기능추가 인증 nextjs 로그아웃 연동#14
Merged
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough새 로그아웃 플로우를 추가하고 로그인 라우트에서 API_BASE_URL 주입 방식을 정적 import로 변경했다. 공용 상수 모듈을 신설했다. 사이드바 UI는 푸터에 전용 로그아웃 버튼을 도입하고 토큰 제거 및 로그인 페이지로 리다이렉트하도록 처리했다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant S as AppSidebar (Client)
participant C as /api/logout (Next Route)
participant B as Backend API (/api/admin/logout)
U->>S: Click "로그아웃"
note right of S: setLoading(true)<br/>localStorage remove tokens
S->>C: POST /api/logout
C->>B: POST /api/admin/logout (API_BASE_URL)
B-->>C: 200/4xx Response
alt success
C-->>S: 200 OK
S->>S: setLoading(false)
S->>S: router.replace('/login')
else error
C-->>S: Error (throws)
S->>S: setLoading(false)
note right of S: stays on page or handle error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
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 |
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 by CodeRabbit
신기능
리팩터링