From 6fd777d804e7f3cbd30a43708e4f4e82e4c41497 Mon Sep 17 00:00:00 2001 From: Christopher Hight Date: Fri, 5 Jun 2026 11:04:17 -0700 Subject: [PATCH] Update pulled app foundation out into a route of its own --- client/src/App.jsx | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/client/src/App.jsx b/client/src/App.jsx index df48bf8..4dbe717 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -1,5 +1,5 @@ import 'leaflet/dist/leaflet.css'; -import { Routes, Route } from 'react-router-dom'; +import { Routes, Route, Navigate } from 'react-router-dom'; import { useRecipe, Grid, GridItem, useDialog } from "@chakra-ui/react"; import { createContext } from "react"; import Login from "@/Login.jsx"; @@ -46,17 +46,30 @@ function AppFoundation({children}) { // } function App() { - const sidebarContext = createContext(["Home", "Global Map", "Regional Map", "Volcano", "Admin"]); - // const [user, setUser] = useState(null); + const sidebarContext = createContext(["Home", "Global Map", "Regional Map", "Volcano", "Admin"]); + // const [user, setUser] = useState(null); - return ( - - } /> - } /> - } /> - } /> - } /> - } /> + return ( + + {/*Public Routes*/} + } /> + } /> + } /> + } /> + } /> + } /> + + {/*Non-Public Routes*/} + }> + } /> + } /> + } /> + } /> + } /> + + + {/*Redirect Routes*/} + } /> ); }