aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/src/App.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-11-02 00:00:35 +0900
committernsfisis <nsfisis@gmail.com>2025-11-02 00:00:35 +0900
commit104341ddc4add57f83c58cb3fabb23b6fbfdd3e4 (patch)
tree862b109fe257e6170a88929729dae3bddfb6eb49 /frontend/src/App.tsx
parentba1e0c904f810193f25d4f88cc2bb168f1d625fe (diff)
downloadfeedaka-104341ddc4add57f83c58cb3fabb23b6fbfdd3e4.tar.gz
feedaka-104341ddc4add57f83c58cb3fabb23b6fbfdd3e4.tar.zst
feedaka-104341ddc4add57f83c58cb3fabb23b6fbfdd3e4.zip
Diffstat (limited to 'frontend/src/App.tsx')
-rw-r--r--frontend/src/App.tsx35
1 files changed, 24 insertions, 11 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 02db0ca..58b6687 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -1,18 +1,31 @@
import { Redirect, Route, Switch } from "wouter";
-import { Layout } from "./components";
-import { NotFound, ReadArticles, Settings, UnreadArticles } from "./pages";
+import { Layout, ProtectedRoute } from "./components";
+import {
+ Login,
+ NotFound,
+ ReadArticles,
+ Settings,
+ UnreadArticles,
+} from "./pages";
function App() {
return (
- <Layout>
- <Switch>
- <Route path="/" component={() => <Redirect to="/unread" />} />
- <Route path="/unread" component={UnreadArticles} />
- <Route path="/read" component={ReadArticles} />
- <Route path="/settings" component={Settings} />
- <Route component={NotFound} />
- </Switch>
- </Layout>
+ <Switch>
+ <Route path="/login" component={Login} />
+ <Route path="*">
+ <ProtectedRoute>
+ <Layout>
+ <Switch>
+ <Route path="/" component={() => <Redirect to="/unread" />} />
+ <Route path="/unread" component={UnreadArticles} />
+ <Route path="/read" component={ReadArticles} />
+ <Route path="/settings" component={Settings} />
+ <Route component={NotFound} />
+ </Switch>
+ </Layout>
+ </ProtectedRoute>
+ </Route>
+ </Switch>
);
}