From b2cb122404bb5aff05b1da3bc7b5ae19a44fe547 Mon Sep 17 00:00:00 2001 From: lilyyang0077 Date: Sun, 7 Jun 2026 10:44:07 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=9E=99=ED=8A=B8=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.js | 36 +++++++++++++++----------- frontend/src/routes/ProtectedRoute.jsx | 11 ++++++++ 2 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 frontend/src/routes/ProtectedRoute.jsx diff --git a/frontend/src/App.js b/frontend/src/App.js index bc1358b..60aa4a8 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -12,6 +12,7 @@ import Assignment from './pages/pirocheck/assignment/Assignment'; import Deposit from './pages/pirocheck/deposit/Deposit'; import StudentList from './pages/pirocheck/students/StudentList'; import StudentDetail from './pages/pirocheck/students/StudentDetail'; +import ProtectedRoute from "./routes/ProtectedRoute"; function App() { return ( @@ -23,22 +24,27 @@ function App() { } /> } /> - {/* 라이트 헤더 페이지 */} - }> - } /> - } /> - } /> - } /> - + {/* 로그인 필요한 페이지들 */} + }> + + {/* 라이트 헤더 페이지 */} + }> + } /> + } /> + } /> + } /> + + + {/* 다크 헤더 페이지 */} + }> + } /> + } /> + } /> + } /> + } /> + } /> + - {/* 다크 헤더 페이지 */} - }> - } /> - } /> - } /> - } /> - } /> - } /> diff --git a/frontend/src/routes/ProtectedRoute.jsx b/frontend/src/routes/ProtectedRoute.jsx new file mode 100644 index 0000000..37d47d8 --- /dev/null +++ b/frontend/src/routes/ProtectedRoute.jsx @@ -0,0 +1,11 @@ +import { Navigate, Outlet } from "react-router-dom"; + +export default function ProtectedRoute() { + const token = localStorage.getItem("token"); + + if (!token) { + return ; + } + + return ; +} \ No newline at end of file From 169393424121c0011d42d4ab8cdc998de549f3bd Mon Sep 17 00:00:00 2001 From: lilyyang0077 Date: Sun, 7 Jun 2026 11:01:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=EA=B5=AC=EA=B8=80=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EB=A1=9C=EA=B3=A0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/public/index.html | 4 ++-- frontend/public/manifest.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/public/index.html b/frontend/public/index.html index c504689..cf3e89a 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -9,7 +9,7 @@ name="description" content="Web site created using create-react-app" /> - +