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