mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-11 10:41:46 +00:00
Create Dashboard state
This commit is contained in:
23
dashboard/src/states/Dashboard/Dashboard.jsx
Normal file
23
dashboard/src/states/Dashboard/Dashboard.jsx
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import {Box, Toolbar} from "@mui/material";
|
||||||
|
import {Outlet} from "react-router-dom";
|
||||||
|
import Header from "@/states/Dashboard/components/Header";
|
||||||
|
import Sidebar from "@/states/Dashboard/components/Sidebar";
|
||||||
|
import {useState} from "react";
|
||||||
|
import {ProjectProvider} from "@/states/Dashboard/contexts/Project";
|
||||||
|
|
||||||
|
export const Dashboard = () => {
|
||||||
|
const [mobileOpen, setMobileOpen] = useState(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ProjectProvider>
|
||||||
|
<Box sx={{display: "flex", overflow: "hidden"}}>
|
||||||
|
<Header mobileOpen={mobileOpen} toggleOpen={() => setMobileOpen(current => !current)} />
|
||||||
|
<Sidebar mobileOpen={mobileOpen} toggleOpen={() => setMobileOpen(current => !current)} />
|
||||||
|
<Box component="main" sx={{ flexGrow: 1, p: 3, ml: { sm: "260px"} }}>
|
||||||
|
<Toolbar/>
|
||||||
|
<Outlet />
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
</ProjectProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
1
dashboard/src/states/Dashboard/index.js
Normal file
1
dashboard/src/states/Dashboard/index.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
export {Dashboard as default} from "./Dashboard.jsx";
|
||||||
Reference in New Issue
Block a user