import { Grid } from '@mui/material'; import * as prettyBytes from 'pretty-bytes'; import { useMemo } from 'react'; import { AllocationBar } from './Bars'; import { Panel } from './Panels'; import periodicFetch from '../lib/fetchers/periodicFetch'; import Spinner from './Spinner'; import { HeaderText, BodyText } from './Text'; // TODO: need to be removed or revised because it's likely unused. const Storage = ({ uuid }: { uuid: string }): JSX.Element => { const { data: { free = 0, total = 0 } = {}, isLoading } = periodicFetch( `${process.env.NEXT_PUBLIC_API_URL}/get_memory?anvil_uuid=${uuid}`, ); const contentLayoutElement = useMemo( () => ( ), [free, total], ); const contentAreaElement = useMemo( () => (isLoading ? : contentLayoutElement), [contentLayoutElement, isLoading], ); return {contentAreaElement}; }; export default Storage;