diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-13 07:01:40 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-13 07:01:40 -0800 |
| commit | e31b68197ec16d2805ec14c2bf532a03f4739e92 (patch) | |
| tree | bcda027df5c020ec6d12073ef1b132a6a14c2a86 /frontend/src/App.tsx | |
| parent | bd2508211760edbc1bad1d515587d08fd2ec99c9 (diff) | |
| download | neko-e31b68197ec16d2805ec14c2bf532a03f4739e92.tar.gz neko-e31b68197ec16d2805ec14c2bf532a03f4739e92.tar.bz2 neko-e31b68197ec16d2805ec14c2bf532a03f4739e92.zip | |
Implement Frontend Logout with tests
Diffstat (limited to 'frontend/src/App.tsx')
| -rw-r--r-- | frontend/src/App.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index bc4e097..7c9d555 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -40,7 +40,12 @@ function Dashboard() { <header className="dashboard-header"> <h1>Neko Reader</h1> <nav> - {/* Add logout later */} + <button onClick={() => { + fetch('/api/logout', { method: 'POST' }) + .then(() => window.location.href = '/login/'); + }} className="logout-btn"> + Logout + </button> </nav> </header> <div className="dashboard-content"> |
