Skip to content

feat: 로그아웃 구현 완료#146

Merged
heeeeyong merged 1 commit intodevelopfrom
chore/minor-updates
Aug 17, 2025
Merged

feat: 로그아웃 구현 완료#146
heeeeyong merged 1 commit intodevelopfrom
chore/minor-updates

Conversation

@heeeeyong
Copy link
Collaborator

@heeeeyong heeeeyong commented Aug 17, 2025

#️⃣연관된 이슈

없음

📝작업 내용

로그아웃을 프엔에서 로컬스토리지를 삭제하는 방식으로 1차적으로 구현.
추후 회원탈퇴 개발시, 엑세스토큰을 블랙리스트에 추가하는 방식으로 구현하면서 로그아웃 API도 같이 개발하면 그떄 연동할 예정입니다.

💬리뷰 요구사항

없음

Summary by CodeRabbit

  • 신기능
    • 마이페이지에 로그아웃 기능을 추가했습니다. 확인 팝업에서 승인을 누르면 사용자 세션 정보가 안전하게 삭제되고 홈 화면으로 이동합니다. 취소 시에는 현재 화면이 유지됩니다. 명확한 확인 흐름과 일관된 이동으로 계정 전환 및 보안 관리가 더욱 편리해졌습니다.

@vercel
Copy link

vercel bot commented Aug 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
thip Ready Ready Preview Comment Aug 17, 2025 2:01pm

@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

새로운 React 훅 useLogout이 추가되어 localStorage에서 authToken을 제거하고 루트 경로로 이동합니다. Mypage에서 확인 팝업 onConfirm 흐름에 이 훅을 연결하여 팝업을 닫은 뒤 실제 로그아웃을 수행하도록 수정되었습니다.

Changes

Cohort / File(s) Summary
Logout 훅 추가
src/hooks/useLogout.ts
신규 훅 useLogout 추가. handleLogout에서 localStorage의 'authToken' 제거 후 navigate('/')로 리다이렉트(replace: true). { handleLogout } 객체 반환.
Mypage 연동
src/pages/mypage/Mypage.tsx
useLogout를 임포트하여 { handleLogout: logout }로 바인딩. 확인 팝업 onConfirm에서 콘솔 로그와 팝업 종료 후 logout() 호출로 실제 로그아웃 수행.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant P as Mypage
  participant H as useLogout.handleLogout
  participant L as localStorage
  participant R as Router (navigate)

  U->>P: Click "Logout" + Confirm
  P->>P: closePopup()
  P->>H: handleLogout()
  H->>L: remove('authToken')
  H->>R: navigate('/', { replace: true })
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

당근 한 입, 탭 한 번, 퐁- 하고 로그아웃!
토큰은 사라지고 발자국은 집으로 슝—
팝업 문 닫고 바람처럼 경로를 갈아타며,
오늘의 모험 끝! 내일도 / 로 다시 시작!
(\_/) 감사합니다, 깔끔한 퇴장 완료!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a438cfd and 7ad406b.

📒 Files selected for processing (2)
  • src/hooks/useLogout.ts (1 hunks)
  • src/pages/mypage/Mypage.tsx (3 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/minor-updates

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@heeeeyong heeeeyong merged commit 9929319 into develop Aug 17, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant