refactor: fix vertical alignment in the main page

main
Josue 4 years ago committed by Tsu-ba-me
parent 5c1ecd374f
commit c686aa6a71
  1. 68
      striker-ui/pages/index.tsx

@ -1,4 +1,5 @@
import { Grid } from '@material-ui/core'; import { Grid } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import Anvils from '../components/Anvils'; import Anvils from '../components/Anvils';
import Nodes from '../components/Nodes'; import Nodes from '../components/Nodes';
@ -9,23 +10,90 @@ import Memory from '../components/Memory';
import 'fontsource-roboto'; import 'fontsource-roboto';
const useStyles = makeStyles(() => ({
grid: {
height: '100vh',
},
}));
const Home = (): JSX.Element => { const Home = (): JSX.Element => {
const classes = useStyles();
return ( return (
<Grid container alignItems="center" justify="space-around"> <Grid container alignItems="center" justify="space-around">
<Grid item xs={3}> <Grid item xs={3}>
<Grid
container
justify="flex-start"
direction="column"
className={classes.grid}
>
<Anvils /> <Anvils />
<Nodes /> <Nodes />
</Grid> </Grid>
</Grid>
<Grid item xs={5}> <Grid item xs={5}>
<Grid
container
justify="flex-start"
direction="column"
className={classes.grid}
>
<ReplicatedStorage /> <ReplicatedStorage />
</Grid> </Grid>
</Grid>
<Grid item xs={3}> <Grid item xs={3}>
<Grid
container
justify="flex-start"
direction="column"
className={classes.grid}
>
<SharedStorage /> <SharedStorage />
<CPU /> <CPU />
<Memory /> <Memory />
</Grid> </Grid>
</Grid> </Grid>
</Grid>
); );
}; };
export default Home; export default Home;
/*
return (
<Grid container alignItems="center" justify="space-around">
<Grid item xs={3}>
<Grid container justify="flex-start" direction="column">
<Anvils />
<Nodes />
</Grid>
</Grid>
<Grid item xs={5}>
<ReplicatedStorage />
</Grid>
<Grid item xs={3}>
<SharedStorage />
<CPU />
<Memory />
</Grid>
</Grid>
);
<>
<div>
<Grid container justify="flex-start" direction="column">
<Anvils />
<Nodes />
</Grid>
</div>
<Grid container justify="flex-start" direction="column">
<ReplicatedStorage />
</Grid>
<Grid container justify="flex-start" direction="column">
<SharedStorage />
<CPU />
<Memory />
</Grid>
</>
*/

Loading…
Cancel
Save