fix(front-end): remove unnecessary fetch

main
Josue 3 years ago
parent e4681e09c9
commit 4712a76682
  1. 6
      striker-ui/pages/server/index.tsx

@ -3,7 +3,6 @@ import { useRouter } from 'next/router';
import { Box } from '@material-ui/core'; import { Box } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles'; import { makeStyles } from '@material-ui/core/styles';
import PeriodicFetch from '../../lib/fetchers/periodicFetch';
import { FullSize, Preview } from '../../components/Display'; import { FullSize, Preview } from '../../components/Display';
import Header from '../../components/Header'; import Header from '../../components/Header';
@ -45,15 +44,10 @@ const Server = (): JSX.Element => {
const router = useRouter(); const router = useRouter();
const { uuid } = router.query; const { uuid } = router.query;
const { data } = PeriodicFetch<AnvilReplicatedStorage>(
`${process.env.NEXT_PUBLIC_API_URL}/get_replicated_storage?server_uuid=${uuid}`,
);
return ( return (
<> <>
<Header /> <Header />
{typeof uuid === 'string' && {typeof uuid === 'string' &&
data &&
(previewMode ? ( (previewMode ? (
<Box className={classes.container}> <Box className={classes.container}>
<Box className={classes.child}> <Box className={classes.child}>

Loading…
Cancel
Save