app/components/evidence-row.tsx
25 lines and 3 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.
Functions
| Function | Lines | Complexity | Covered | CRAP | Mutation |
|---|---|---|---|---|---|
| EvidenceRow | 7 to 28 | 3 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
| <anonymous:14> | 14 to 14 | 3 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
| <anonymous:21> | 21 to 23 | 1 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
Imports
It imports no other module of this repo. Imported by app/components/taxonomy-listing.tsx, app/routes/blog.$slug.tsx, app/routes/blog._index.tsx, app/routes/colophon.tsx, app/routes/publications.tsx.
Source
import type { ReactNode } from "react";
// Its sheet is imported by each consuming route, not here, so every sheet a page
// loads stays visible in the route's own imports.
const EVIDENCE_FACTS = 3;
export function EvidenceRow({
facts,
detail,
}: {
facts: ReactNode[];
detail?: ReactNode;
}) {
const present = facts.filter((fact) => fact !== null && fact !== undefined && fact !== false);
if (present.length < EVIDENCE_FACTS) return null;
return (
<>
<p className="evidence">
{/* Position is a fact's only stable identity here: it is a node, not a value. */}
{present.map((fact, i) => (
<span key={i}>{fact}</span>
))}
</p>
{detail ? <p className="evidence-detail">{detail}</p> : null}
</>
);
}