From 104341ddc4add57f83c58cb3fabb23b6fbfdd3e4 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 2 Nov 2025 00:00:35 +0900
Subject: wip

---
 frontend/src/App.tsx | 35 ++++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)

(limited to 'frontend/src/App.tsx')

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>
 	);
 }
 
-- 
cgit v1.2.3-70-g09d2

