import { For, type JSX } from "solid-js"; import { statusResource } from "../state"; import { EVENT_STATE_ORDER, type EventState } from "../types"; const ACCENT: Record = { queued: "text-[#9ec9ff]", running: "text-[#ffe26b]", done: "text-[#7fe5a3]", failed: "text-[#ff8e85]", skipped: "text-ink-300", }; export function Stats(): JSX.Element { const counts = (): Record => { const status = statusResource(); if (!status) return { queued: 0, running: 0, done: 0, failed: 0, skipped: 0 }; return status.issue_event_counts ?? status.event_counts; }; return (
{(state) => (
{state} {counts()[state] ?? 0}
)}
); }