bbgo_origin/frontend/pages/index.tsx

65 lines
1.8 KiB
TypeScript
Raw Normal View History

2021-01-24 06:32:52 +00:00
import React from 'react';
2021-01-24 10:12:26 +00:00
2021-01-25 08:56:02 +00:00
import {makeStyles} from '@material-ui/core/styles';
2021-01-24 06:32:52 +00:00
import Container from '@material-ui/core/Container';
import Typography from '@material-ui/core/Typography';
import Box from '@material-ui/core/Box';
2021-01-24 10:12:26 +00:00
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
2021-01-24 06:32:52 +00:00
2021-01-25 10:29:31 +00:00
import TotalAssetsPie from '../components/TotalAssetsPie';
import TotalAssetSummary from '../components/TotalAssetsSummary';
2021-01-28 10:51:35 +00:00
import TradingVolumePanel from '../components/TradingVolumePanel';
2021-01-25 10:29:31 +00:00
import ExchangeSessionTabPanel from '../components/ExchangeSessionTabPanel';
2021-01-24 06:07:44 +00:00
2021-01-24 10:12:26 +00:00
const useStyles = makeStyles((theme) => ({
2021-01-25 08:56:02 +00:00
paper: {
height: 140,
width: 200,
},
2021-01-25 10:29:31 +00:00
totalAssetsBox: {
2021-01-25 08:56:02 +00:00
height: 300,
},
2021-01-29 04:55:11 +00:00
totalAssetsSummary: {
padding: theme.spacing(2),
2021-01-26 10:10:08 +00:00
},
2021-01-25 08:56:02 +00:00
control: {
padding: theme.spacing(2),
},
2021-01-24 10:12:26 +00:00
}));
2021-01-24 06:07:44 +00:00
export default function Home() {
2021-01-25 08:56:02 +00:00
const classes = useStyles();
2021-01-25 10:29:31 +00:00
return (
<Container>
2021-01-29 04:55:11 +00:00
<Box m={4}>
<Paper className={classes.totalAssetsSummary}>
2021-01-25 10:29:31 +00:00
<Typography variant="h4" component="h2" gutterBottom>
Total Assets
</Typography>
<Grid container spacing={3}>
<Grid item xs={12} md={6}>
<TotalAssetSummary/>
</Grid>
2021-01-25 08:56:02 +00:00
2021-01-25 10:29:31 +00:00
<Grid item xs={12} md={6}>
<Box className={classes.totalAssetsBox}>
<TotalAssetsPie/>
</Box>
2021-01-25 08:56:02 +00:00
</Grid>
</Grid>
2021-01-29 04:55:11 +00:00
</Paper>
2021-01-25 08:56:02 +00:00
2021-01-29 04:55:11 +00:00
<TradingVolumePanel/>
2021-01-26 10:10:08 +00:00
2021-01-29 04:55:11 +00:00
<ExchangeSessionTabPanel/>
</Box>
2021-01-25 08:56:02 +00:00
</Container>
);
2021-01-24 06:07:44 +00:00
}
2021-01-24 06:32:52 +00:00