bbgo_origin/frontend/layouts/DashboardLayout.js

59 lines
1.6 KiB
JavaScript
Raw Permalink Normal View History

2021-02-01 09:13:27 +00:00
import React from "react";
import {makeStyles} from "@material-ui/core/styles";
import AppBar from "@material-ui/core/AppBar";
import Toolbar from "@material-ui/core/Toolbar";
import Typography from "@material-ui/core/Typography";
import Container from '@material-ui/core/Container';
import SideBar from "../components/SideBar";
2021-10-25 18:02:29 +00:00
import ConnectWallet from '../components/ConnectWallet';
2021-02-01 09:13:27 +00:00
const useStyles = makeStyles((theme) => ({
root: {
2021-02-05 01:48:40 +00:00
flexGrow: 1,
2021-02-01 09:13:27 +00:00
display: 'flex',
},
content: {
flexGrow: 1,
height: '100vh',
overflow: 'auto',
},
appBar: {
zIndex: theme.zIndex.drawer + 1,
},
appBarSpacer: theme.mixins.toolbar,
2021-10-25 18:02:29 +00:00
container: { },
toolbar:{
justifyContent: 'space-between',
}
2021-02-01 09:13:27 +00:00
}));
export default function DashboardLayout({children}) {
const classes = useStyles();
return (
<div className={classes.root}>
<AppBar className={classes.appBar}>
2021-10-25 18:02:29 +00:00
<Toolbar className={classes.toolbar}>
2021-02-01 09:13:27 +00:00
<Typography variant="h6" className={classes.title}>
BBGO
</Typography>
{/* <Button color="inherit">Login</Button> */}
2021-10-25 18:02:29 +00:00
<ConnectWallet />
2021-02-01 09:13:27 +00:00
</Toolbar>
</AppBar>
<SideBar/>
<main className={classes.content}>
<div className={classes.appBarSpacer}/>
2021-02-05 01:48:40 +00:00
<Container className={classes.container} maxWidth={false} disableGutters={true}>
2021-02-01 09:13:27 +00:00
{children}
</Container>
</main>
</div>
);
}