frontPanel/src/pages/main.tsx

33 lines
951 B
TypeScript
Executable File

import Header from '@ui_kit/Header/Header';
import Sidebar from '@ui_kit/Sidebar';
import Box from '@mui/material/Box';
import {Outlet} from "react-router-dom";
import {useTheme} from "@mui/material";
export default function Main (sidebar: boolean) {
const theme = useTheme();
return (
<>
<Header isLoggedIn={true}/>
<Box sx={{
display: 'flex'
}}
>
<Sidebar sidebar={sidebar} />
<Box
sx={{
background: theme.palette.background.default,
width: '100%',
padding: '25px',
height: 'calc(100vh - 80px)',
overflow: 'auto',
boxSizing: "border-box"
}}
>
<Outlet />
</Box>
</Box>
</>
)
}