From 86706122595c9d9c70be755c9ef902de1517e0ed Mon Sep 17 00:00:00 2001 From: Jagraj Aulakh Date: Thu, 13 Apr 2023 18:18:30 -0400 Subject: [PATCH] Cleanup routes with AuthRoute --- frontend/src/App.js | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/frontend/src/App.js b/frontend/src/App.js index 946d60a..3ecc99f 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -9,29 +9,32 @@ import ManagePage from "./pages/ManagePage"; import ManageStudentsPage from "./pages/ManageStudentsPage"; import AuthenticatedRoute from "./components/AuthenticatedRoute"; +const AuthRoute = ({ isAuthenticated = true, path, children }) => { + return ( + + + {children} + + + ); +}; + function App() { return (
- - + - - - - + + - - - - + + - - - - + + + - - + {(params) => { @@ -43,11 +46,9 @@ function App() { }} - - + - - + {(params) => {