"use client"; import { useI18n } from "@/lib/i18n/useI18n"; import type { RecapDowntimeTopRow } from "@/lib/recap/types"; type Props = { rows: RecapDowntimeTopRow[]; }; export default function RecapDowntimeTop({ rows }: Props) { const { t } = useI18n(); return (
{t("recap.downtime.top")}
{rows.length === 0 ? (
{t("recap.empty.production")}
) : (
{rows.slice(0, 3).map((row) => (
{row.reasonLabel}
{row.minutes.toFixed(1)} min ยท {row.percent.toFixed(1)}%
))}
)}
); }