import { useState } from "react"; import { useTranslation } from "react-i18next"; import clsx from "clsx"; import { ChevronRight } from "lucide-react"; import type { AuditRow } from "../lib/api"; import { Button } from "./ui/Button"; import { RelativeTime } from "./ui/RelativeTime"; /** A folded run of one job's successful runs (lib/auditGroups, E31): the row shows the newest, this * opens the earlier ones, each with its moment and its result (`detailOf`, the row's own wording). */ export default function AuditEarlierRuns({ runs, detailOf, }: { runs: AuditRow[]; detailOf: (run: AuditRow) => string | null; }) { const { t } = useTranslation(); const [open, setOpen] = useState(false); const earlier = runs.slice(1); return (
{open && ( )}
); }