import { Grid } from '@material-ui/core'; import Panel from './Panel'; import { AllocationBar } from './Bars'; import { HeaderText, BodyText } from './Text'; import PeriodicFetch from '../lib/fetchers/periodicFetch'; const CPU = ({ uuid }: { uuid: string }): JSX.Element => { const { data, isLoading } = PeriodicFetch( `${process.env.NEXT_PUBLIC_API_URL}/anvils/get_cpu?anvil_uuid=`, uuid, ); const cpuData = isLoading || !data ? { allocated: 0, cores: 0, threads: 0 } : data; return ( ); }; export default CPU;