import classNames from "classnames"; import { useTranslation } from "next-i18next"; export default function Pool({ name, free, allocated, healthy }) { const { t } = useTranslation(); const usedPercent = Math.round((allocated / (free + allocated)) * 100); const statusColor = healthy ? "bg-green-500" : "bg-yellow-500"; return (
{name}
{`${t("common.bytes", { value: allocated, maximumFractionDigits: 1, binary: true, })} / ${t("common.bytes", { value: free + allocated, maximumFractionDigits: 1, binary: true, })}`} ({usedPercent}%)
); }