import useSWR from "swr"; import { FiHardDrive } from "react-icons/fi"; import { BiError } from "react-icons/bi"; import { formatBytes } from "utils/stats-helpers"; export default function Disk({ options }) { const { data, error } = useSWR(`/api/widgets/resources?type=disk&target=${options.disk}`, { refreshInterval: 1500, }); if (error || data?.error) { return (