import { IssuesOverviewAttributes } from "@/types/issues"; const count = (value: number, noun: string) => `${value.toLocaleString()} ${noun}${value === 1 ? "" : "s"}`; /** * The reduction the page makes, as one line under the title. Per-verdict * counts live on the verdict tabs, so they are not repeated here. */ export const IssuesSummary = ({ summary, }: { summary: IssuesOverviewAttributes; }) => (

{count(summary.issues, "issue")} {" "} folded from{" "} {count(summary.findings, "failed finding")} {summary.not_exploitable_findings > 0 && ` ยท ${count(summary.not_exploitable_findings, "finding")} already covered by a control`}

);