From b432c8a8ec98f6aa78a4e49a235c072cb9db7b08 Mon Sep 17 00:00:00 2001 From: "Daniel S. Hansen" Date: Wed, 23 Jul 2025 11:01:25 -0700 Subject: [PATCH] Add Dashboard parent component to Header, Siderbar, Canvas in order to faciliate lifting state --- client/src/App.jsx | 45 +------------------ client/src/components/layout/Dashboard.jsx | 50 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 43 deletions(-) create mode 100644 client/src/components/layout/Dashboard.jsx diff --git a/client/src/App.jsx b/client/src/App.jsx index c60c2f9..ad2140b 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -1,49 +1,8 @@ -import { Global, css } from "@emotion/react"; -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'; +import Dashboard from './components/layout/Dashboard.jsx' function App() { - const recipe = useRecipe({ key: "canvas" }); - const styles = recipe(); - return ( - <> - - - -
- - - - - - - - - + ); } diff --git a/client/src/components/layout/Dashboard.jsx b/client/src/components/layout/Dashboard.jsx new file mode 100644 index 0000000..eeb1042 --- /dev/null +++ b/client/src/components/layout/Dashboard.jsx @@ -0,0 +1,50 @@ +import { Global, css } from "@emotion/react"; +import Header from './Header/Header.jsx'; +import Sidebar from './Sidebar/Sidebar.jsx'; +import Canvas from './Canvas/Canvas.jsx'; +import { Grid, GridItem, useRecipe, Box } from '@chakra-ui/react'; + +export default function Dashboard() { + const recipe = useRecipe({ key: "canvas" }); + const styles = recipe(); + + return ( + <> + + + +
+ + + + + + + + + + ); +} + +