diff --git a/client/src/App.jsx b/client/src/App.jsx
index cad1a7d..b98cd78 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -1,10 +1,8 @@
import { useState } from 'react'
-import Header from './components/header.jsx';
-import Sidebar from './components/sidebar.jsx';
-import Widget from './components/Widget.jsx'
-import { Grid, GridItem, useRecipe } from "@chakra-ui/react"
-import CanvasHeader from './components/CanvasHeader.jsx'
-
+import Header from './components/layout/Header/Header.jsx';
+import Sidebar from './components/layout/Sidebar/Sidebar.jsx';
+import Canvas from './components/layout/Canvas/Canvas.jsx';
+import { Grid, GridItem, useRecipe, Box } from '@chakra-ui/react';
function App() {
const recipe = useRecipe({ key: "canvas" });
@@ -24,20 +22,8 @@ function App() {
-
-
-
-
-
-
-
-
-
+
+
);
}
diff --git a/client/src/components/layout/Canvas/Canvas.jsx b/client/src/components/layout/Canvas/Canvas.jsx
new file mode 100644
index 0000000..ef6e2a8
--- /dev/null
+++ b/client/src/components/layout/Canvas/Canvas.jsx
@@ -0,0 +1,23 @@
+// This Canvas component will be used to dynamically populate
+// the main canvas section of the web App with a default state
+// of 'WidgetCanvas'
+import { useState } from "react";
+import { Box } from "@chakra-ui/react";
+import CanvasHeader from "./CanvasHeader";
+import WidgetCanvas from "./views/WidgetCanvas";
+// import MapCanvas from "./views/MapCanvas";
+// import AdminCanvas from "./views/AdminCanvas";
+
+export default function Canvas() {
+ const [view, setView] = useState("widget");
+
+ return (
+
+
+ {view === "widget" && }
+ {/* {view === "map" && } */}
+ {/* {view === "admin" && } */}
+
+ );
+}
+
diff --git a/client/src/components/CanvasHeader.jsx b/client/src/components/layout/Canvas/CanvasHeader.jsx
similarity index 96%
rename from client/src/components/CanvasHeader.jsx
rename to client/src/components/layout/Canvas/CanvasHeader.jsx
index 57ff277..cfe2076 100644
--- a/client/src/components/CanvasHeader.jsx
+++ b/client/src/components/layout/Canvas/CanvasHeader.jsx
@@ -14,7 +14,6 @@ export default function CanvasHeader() {
as="header"
position="sticky"
top="0"
- // zIndex="banner"
bg="base200"
borderBottom="1px solid"
borderColor="gray.200"
diff --git a/client/src/components/CanvasHeaderNav.jsx b/client/src/components/layout/Canvas/CanvasHeaderNav.jsx
similarity index 100%
rename from client/src/components/CanvasHeaderNav.jsx
rename to client/src/components/layout/Canvas/CanvasHeaderNav.jsx
diff --git a/client/src/components/SearchBar.jsx b/client/src/components/layout/Canvas/SearchBar.jsx
similarity index 100%
rename from client/src/components/SearchBar.jsx
rename to client/src/components/layout/Canvas/SearchBar.jsx
diff --git a/client/src/components/SettingsButton.jsx b/client/src/components/layout/Canvas/SettingsButton.jsx
similarity index 100%
rename from client/src/components/SettingsButton.jsx
rename to client/src/components/layout/Canvas/SettingsButton.jsx
diff --git a/client/src/components/layout/Canvas/Widget.jsx b/client/src/components/layout/Canvas/Widget.jsx
new file mode 100644
index 0000000..489c98c
--- /dev/null
+++ b/client/src/components/layout/Canvas/Widget.jsx
@@ -0,0 +1,16 @@
+export default function Widget({ title }) {
+ return (
+ <>
+
+ {title}
+
+
+ This is the widget content - drag or resize me!
+
+ >
+ );
+ }
+
diff --git a/client/src/components/layout/Canvas/views/AdminCanvas.jsx b/client/src/components/layout/Canvas/views/AdminCanvas.jsx
new file mode 100644
index 0000000..e69de29
diff --git a/client/src/components/layout/Canvas/views/MapCanvas.jsx b/client/src/components/layout/Canvas/views/MapCanvas.jsx
new file mode 100644
index 0000000..e69de29
diff --git a/client/src/components/Widget.jsx b/client/src/components/layout/Canvas/views/WidgetCanvas.jsx
similarity index 51%
rename from client/src/components/Widget.jsx
rename to client/src/components/layout/Canvas/views/WidgetCanvas.jsx
index b3413ad..2395ae8 100644
--- a/client/src/components/Widget.jsx
+++ b/client/src/components/layout/Canvas/views/WidgetCanvas.jsx
@@ -4,8 +4,10 @@
import { useState } from 'react';
import GridLayout from 'react-grid-layout';
+import Widget from '../Widget.jsx';
+import { Box } from '@chakra-ui/react';
-export default function Widget() {
+export default function WidgetCanvas() {
// Define widgets initial position and size
// TODO Add dynamic adding/deleting of widgets via options button
const [layout, setLayout] = useState([
@@ -30,28 +32,11 @@ export default function Widget() {
onLayoutChange={onLayoutChange}
draggableHandle=".widget-handle" // Make only the header draggable
>
-
-
- VDAP Widget
+ {layout.map((item) => (
+
+
-
- This is the widget content - drag or resize me!
-
-
-
- VDAP Widget
-
-
- This is the widget content - drag or resize me!
-
-
-
- VDAP Widget
-
-
- This is the widget content - drag or resize me!
-
-
+ ))}
);
}
diff --git a/client/src/components/Header.jsx b/client/src/components/layout/Header/Header.jsx
similarity index 89%
rename from client/src/components/Header.jsx
rename to client/src/components/layout/Header/Header.jsx
index a9ee737..d11f2d6 100644
--- a/client/src/components/Header.jsx
+++ b/client/src/components/layout/Header/Header.jsx
@@ -1,5 +1,12 @@
import { chakra, useRecipe, Box, Button, Stack, Text, Flex } from "@chakra-ui/react"
-import UserAvatarMenu from "./UserAvatarMenu";
+import UserAvatarMenu from "./UserAvatarMenu.jsx";
+
+//TODO: Dynamically populate per each user
+const user = {
+ name: "venessa kuchenik",
+ email: "vkuchenik@contractor.usgs.gov",
+ // avatar: "src\\assets\\user_profile.svg"
+}
export default function Header() {
const recipe = useRecipe({ key: "header" });
@@ -19,8 +26,3 @@ export default function Header() {
);
}
-const user = {
- name: "venessa kuchenik",
- email: "vkuchenik@contractor.usgs.gov",
- // avatar: "src\\assets\\user_profile.svg"
-}
\ No newline at end of file
diff --git a/client/src/components/UserAvatarMenu.jsx b/client/src/components/layout/Header/UserAvatarMenu.jsx
similarity index 92%
rename from client/src/components/UserAvatarMenu.jsx
rename to client/src/components/layout/Header/UserAvatarMenu.jsx
index d7a5850..cbef63d 100644
--- a/client/src/components/UserAvatarMenu.jsx
+++ b/client/src/components/layout/Header/UserAvatarMenu.jsx
@@ -8,7 +8,7 @@ export default function UserAvatarMenu({ name, avatar }) {
diff --git a/client/src/components/Sidebar.jsx b/client/src/components/layout/Sidebar/Sidebar.jsx
similarity index 100%
rename from client/src/components/Sidebar.jsx
rename to client/src/components/layout/Sidebar/Sidebar.jsx