From 2c795383d2b0da04787cf5424043e12cfdb1d0a3 Mon Sep 17 00:00:00 2001 From: Josue Date: Tue, 27 Apr 2021 19:11:14 -0400 Subject: [PATCH] refactor: switch from Grid to Box for more flexible layout using flexbox --- striker-ui/pages/index.tsx | 84 ++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 44 deletions(-) diff --git a/striker-ui/pages/index.tsx b/striker-ui/pages/index.tsx index 88e57318..49ec5aa7 100644 --- a/striker-ui/pages/index.tsx +++ b/striker-ui/pages/index.tsx @@ -1,6 +1,7 @@ -import { Grid } from '@material-ui/core'; +import { Box } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; +import Header from '../components/Header'; import Anvils from '../components/Anvils'; import Nodes from '../components/Nodes'; import CPU from '../components/CPU'; @@ -10,9 +11,16 @@ import Network from '../components/Network'; import PeriodicFetch from '../lib/fetchers/periodicFetch'; import Servers from '../components/Servers'; +import AnvilProvider from '../components/AnvilContext'; + const useStyles = makeStyles(() => ({ - grid: { - height: '100vh', + child: { + width: '22%', + height: '100%', + }, + server: { + width: '35%', + height: '100%', }, })); @@ -25,50 +33,38 @@ const Home = (): JSX.Element => { ); return ( - - - - - - - - - - - - - - - - - - - +
+ + - {data?.anvils?.length ? ( + {data?.anvils && ( <> - - - + + + + + + + + + + + + + + + - ) : null} - - - + )} + + + ); };