Skip to content

Conversation

@vintage-luvu
Copy link
Collaborator

@vintage-luvu vintage-luvu commented Dec 31, 2025

概要

/api/v1/logoutへ遷移してバックエンドに処理を委譲する方式を実装

変更内容

  • src/components/Header.tsxでログアウトボタンの onClick で onLogout を呼ぶように変更
  • src/App.tsxでhandleLogout を追加し、window.location.href = '/api/v1/logout' へ遷移するよう実装

影響範囲

  • 画面右上(Header)のログアウトボタンの挙動が変更されます
    • 変更前:フロント側の状態更新等(実装依存)
    • 変更後:常に /api/v1/logout へ遷移
  • Header コンポーネントのPropsに onLogout が追加されるため、Header を利用している箇所の型に影響する可能性があります

テスト

  • 動作手順:
  1. フロントエンドを起動(npm run dev)
  2. 画面右上の「ログアウト」をクリック
  • 動作結果:
  1. ブラウザが /api/v1/logout に遷移することを確認
  2. バックエンド未起動の場合エラーとなるが、フロント側の導線(遷移処理)が正しく発火していることを確認

@Git-Yuya Git-Yuya changed the title feat: wire logout button to /api/logout ログアウト機能の実装 Jan 1, 2026
Copy link
Collaborator

@Git-Yuya Git-Yuya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

特に問題はなかったのですが、ログインとログアウトのエンドポイントをこちらで修正しました。

@Git-Yuya Git-Yuya merged commit f2e26ad into main Jan 1, 2026
2 checks passed
@Git-Yuya Git-Yuya deleted the feat/logout-flow branch January 16, 2026 05:31
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.

3 participants