"use client"; import Link from "next/link"; import { useMemo } from "react"; import { useDerived, useSnap } from "@/lib/client"; import { QueueGroup, QueueRow } from "@/components/portal"; import { countRows } from "@/lib/today"; export default function CountsGroup() { const { s } = useSnap(); const { byId } = useDerived(); const rows = useMemo(() => countRows(s, byId), [s, byId]); return ( {rows.map((r) => ( {r.garments.length ? `${r.garments.join(", ")} · ` : ""}{r.last} · {r.sizes} line{r.sizes === 1 ? "" : "s"}} actions={Start the count} /> ))} ); }