aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/App.tsx
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-13 07:13:18 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-13 07:13:18 -0800
commita5cd9538b0db731a0d0e10e58804ef8ad32211b7 (patch)
tree0b46b0f43965de9df03b023abc40d869224e38d8 /frontend/src/App.tsx
parente31b68197ec16d2805ec14c2bf532a03f4739e92 (diff)
downloadneko-a5cd9538b0db731a0d0e10e58804ef8ad32211b7.tar.gz
neko-a5cd9538b0db731a0d0e10e58804ef8ad32211b7.tar.bz2
neko-a5cd9538b0db731a0d0e10e58804ef8ad32211b7.zip
Implement Frontend Settings with tests
Diffstat (limited to 'frontend/src/App.tsx')
-rw-r--r--frontend/src/App.tsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 7c9d555..8c7be19 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -33,6 +33,7 @@ function RequireAuth({ children }: { children: React.ReactElement }) {
import FeedList from './components/FeedList';
import FeedItems from './components/FeedItems';
+import Settings from './components/Settings';
function Dashboard() {
return (
@@ -40,6 +41,16 @@ function Dashboard() {
<header className="dashboard-header">
<h1>Neko Reader</h1>
<nav>
+ <a href="/settings" onClick={(e) => {
+ e.preventDefault();
+ window.history.pushState({}, '', '/settings');
+ // Quick hack for navigation without full router link if inside Router context,
+ // but here we are inside BrowserRouter so we should use Link or just simple navigation
+ // actually let's just use a real Link if we can, but we need import.
+ // For now, let's just rely on the Router catching the URL change if we use proper Link
+ // or just a button that navigates.
+ }} style={{ color: 'white', marginRight: '1rem' }}>Settings</a>
+
<button onClick={() => {
fetch('/api/logout', { method: 'POST' })
.then(() => window.location.href = '/login/');
@@ -55,6 +66,7 @@ function Dashboard() {
<main className="dashboard-main">
<Routes>
<Route path="/feed/:feedId" element={<FeedItems />} />
+ <Route path="/settings" element={<Settings />} />
<Route path="/" element={<p>Select a feed to view items.</p>} />
</Routes>
</main>