Add new tabs and views under Admin sidebar tab

This commit is contained in:
Daniel S. Hansen
2025-08-13 15:18:03 -07:00
parent 54530f324f
commit c496396092
7 changed files with 242 additions and 24 deletions
+6 -3
View File
@@ -4,7 +4,7 @@ import Volcano from "./views/Volcano";
import Admin from "./views/Admin";
import Account from "./views/Account"
import Home from "./views/Home";
import { DASHBOARD_VIEWS } from "@/constants/viewKeys";
import { DASHBOARD_VIEWS, ADMIN_VIEWS } from "@/constants/viewKeys";
import { chakra } from "@chakra-ui/react";
import Personal from "./views/Personal";
import Security from "./views/Security";
@@ -13,14 +13,17 @@ export default function Canvas(props) {
const { view } = props;
return (
<chakra.div width="100%" height="100%">
{/* Check if view is a tab inside the Canvas Header */}
{/* Check if view is a tab inside the Home Header */}
{ DASHBOARD_VIEWS.includes(view) && (
<Home {...props}/>
)}
{/* Check if view is a tab inside the Admin Header */}
{ ADMIN_VIEWS.includes(view) && (
<Admin {...props}/>
)}
{view === "global" && <GlobalMap />}
{view === "regional" && <RegionalMap />}
{view === "volcano" && <Volcano />}
{view === "admin" && <Admin />}
{view === "account" && <Account />}
{view === "settings" && <Personal />}
{view === "personal" && <Personal />}