refactor: remove server side rendering for now

main
Josue 4 years ago committed by Tsu-ba-me
parent bd778144d6
commit 1e32b3d32f
  1. 18
      striker-ui/pages/index.tsx

@ -1,4 +1,3 @@
import { GetServerSidePropsResult } from 'next';
import { Grid } from '@material-ui/core'; import { Grid } from '@material-ui/core';
import Anvils from '../components/Anvils'; import Anvils from '../components/Anvils';
@ -6,36 +5,23 @@ import Nodes from '../components/Nodes';
import CPU from '../components/CPU'; import CPU from '../components/CPU';
import SharedStorage from '../components/SharedStorage'; import SharedStorage from '../components/SharedStorage';
import ReplicatedStorage from '../components/ReplicatedStorage'; import ReplicatedStorage from '../components/ReplicatedStorage';
import State from '../components/State';
import Memory from '../components/Memory'; import Memory from '../components/Memory';
import API_BASE_URL from '../lib/consts/API_BASE_URL'; import 'fontsource-roboto';
import fetchJSON from '../lib/fetchers/fetchJSON';
import 'typeface-muli';
export async function getServerSideProps(): Promise<
GetServerSidePropsResult<AnvilList>
> {
return {
props: await fetchJSON(`${API_BASE_URL}/api/anvils`),
};
}
const Home = (): JSX.Element => { const Home = (): JSX.Element => {
return ( return (
<Grid container alignItems="center" justify="space-around"> <Grid container alignItems="center" justify="space-around">
<Grid item xs={3}> <Grid item xs={3}>
<Anvils /> <Anvils />
<State />
<Nodes /> <Nodes />
</Grid> </Grid>
<Grid item xs={5}> <Grid item xs={5}>
<ReplicatedStorage /> <ReplicatedStorage />
</Grid> </Grid>
<Grid item xs={3}> <Grid item xs={3}>
<CPU />
<SharedStorage /> <SharedStorage />
<CPU />
<Memory /> <Memory />
</Grid> </Grid>
</Grid> </Grid>

Loading…
Cancel
Save