import { MemoryStick } from "lucide-react"; import { useTranslation } from "react-i18next"; import type { ServerMetrics } from "@/main-axios"; import { RadialGauge, Sparkline, MiniStat } from "@/components/charts"; import { MetricCard } from "./MetricCard"; export function MemoryCard({ metrics, history, }: { metrics: ServerMetrics | null; history: number[]; }) { const { t } = useTranslation(); const percent = metrics?.memory?.percent ?? null; const usedGiB = metrics?.memory?.usedGiB ?? null; const totalGiB = metrics?.memory?.totalGiB ?? null; const freeGiB = usedGiB !== null && totalGiB !== null ? totalGiB - usedGiB : null; return ( } >
); }