bbgo_origin/apps/frontend/layouts/DashboardLayout.js

66 lines
1.5 KiB
JavaScript
Raw Normal View History

2022-06-11 00:57:54 +00:00
import React from 'react';
2021-02-01 09:13:27 +00:00
2022-06-15 03:37:05 +00:00
import { makeStyles } from '@mui/styles';
2022-06-12 15:11:42 +00:00
import AppBar from '@mui/material/AppBar';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import Container from '@mui/material/Container';
2021-02-01 09:13:27 +00:00
2022-06-11 00:57:54 +00:00
import SideBar from '../components/SideBar';
2022-06-15 03:37:05 +00:00
import SyncButton from '../components/SyncButton';
2021-02-01 09:13:27 +00:00
2021-10-25 18:02:29 +00:00
import ConnectWallet from '../components/ConnectWallet';
2022-06-14 07:33:22 +00:00
import { Box } from '@mui/material';
2021-10-25 18:02:29 +00:00
2021-02-01 09:13:27 +00:00
const useStyles = makeStyles((theme) => ({
2022-06-11 00:57:54 +00:00
root: {
flexGrow: 1,
display: 'flex',
},
content: {
flexGrow: 1,
height: '100vh',
overflow: 'auto',
},
appBar: {
zIndex: theme.zIndex.drawer + 1,
},
appBarSpacer: theme.mixins.toolbar,
container: {},
toolbar: {
justifyContent: 'space-between',
2022-06-14 07:33:22 +00:00
},
2021-02-01 09:13:27 +00:00
}));
2022-06-11 00:57:54 +00:00
export default function DashboardLayout({ children }) {
const classes = useStyles();
return (
<div className={classes.root}>
<AppBar className={classes.appBar}>
<Toolbar className={classes.toolbar}>
<Typography variant="h6" className={classes.title}>
BBGO
</Typography>
2022-06-14 07:28:37 +00:00
<Box sx={{ flexGrow: 1 }} />
<SyncButton />
2022-06-11 00:57:54 +00:00
<ConnectWallet />
</Toolbar>
</AppBar>
<SideBar />
<main className={classes.content}>
<div className={classes.appBarSpacer} />
<Container
className={classes.container}
maxWidth={false}
disableGutters={true}
>
{children}
</Container>
</main>
</div>
);
2021-02-01 09:13:27 +00:00
}