Open this example in the interactive library
Source code
// app/issues/page.tsx
export default function TriageStatusTotals() {
const issues = [
{ id: 12, title: "Header spacing", owner: "Kim", severity: 1, open: true },
{ id: 14, title: "Invoice rounding", owner: "Sam", severity: 3, open: true },
{ id: 21, title: "Alt text", owner: "Kim", severity: 2, open: false },
];
return (
<dl>
<dt>Open</dt>
<dd>{issues.filter((i) => i.open).length}</dd>
<dt>Closed</dt>
<dd>{issues.filter((i) => !i.open).length}</dd>
</dl>
);
}
