Rename and Restructure

+ took out extra 'layout' directory.
+ 'Canvas' postfix removed from all files in the views directory.
+ "WidgetCanvas" renamed to "MyDashboard"
This commit is contained in:
2025-08-05 12:57:18 -07:00
parent 03a335710f
commit ff95f2cbc0
27 changed files with 20 additions and 20 deletions
+27
View File
@@ -0,0 +1,27 @@
import { Box } from "@chakra-ui/react";
import GlobalMapCanvas from "./views/GlobalMap";
import RegionalMapCanvas from "./views/RegionalMap";
import VolcanoCanvas from "./views/Volcano";
import AdminCanvas from "./views/Admin";
import AccountCanvas from "./views/Account"
import SettingsCanvas from "./views/Settings"
import { HomeCanvas } from "./views/Home";
import { DASHBOARD_VIEWS } from "@/constants/viewKeys";
export default function Canvas({...props}) {
const { view } = props;
return (
<>
{/* Check if view is a tab inside the Canvas Header */}
{ DASHBOARD_VIEWS.includes(view) && (
<HomeCanvas width="100%" height="100%" {...props}/>
)}
{view === "global" && <GlobalMapCanvas />}
{view === "regional" && <RegionalMapCanvas />}
{view === "volcano" && <VolcanoCanvas />}
{view === "admin" && <AdminCanvas />}
{view === "account" && <AccountCanvas />}
{view === "settings" && <SettingsCanvas />}
</>
);
}