diff --git a/striker-ui/pages/index.tsx b/striker-ui/pages/index.tsx index c9b1f8e7..3ba25e67 100644 --- a/striker-ui/pages/index.tsx +++ b/striker-ui/pages/index.tsx @@ -19,7 +19,7 @@ const Home = (): JSX.Element => { const classes = useStyles(); const { data } = PeriodicFetch( - 'http://localhost:8080', + process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080', '/anvils/get_anvils', ); @@ -33,7 +33,7 @@ const Home = (): JSX.Element => { className={classes.grid} > - + @@ -53,19 +53,13 @@ const Home = (): JSX.Element => { direction="column" className={classes.grid} > - 0 ? data.anvils[0] : 'no uuid'} - /> - 0 ? data.anvils[0].anvil_uuid : 'no uuid' - } - /> - 0 ? data.anvils[0].anvil_uuid : 'no uuid' - } - /> + {data?.anvils?.length ? ( + <> + + + + + ) : null}