import { useState } from 'react'; import { useData } from '../data/context'; import { hasLabel } from '../content/ui'; import { SourceChip } from './SourceChip'; import { L, ResultChip, V, Who } from './text'; import { useHydrated } from './hydrated'; import { BASE } from '../routes'; const p = 'verifications'; /** Glyph from the tile's data status: ✓ only for MATCH, ✗ for MISMATCH, … for anything else. */ export const glyphKey = (r: string) => (r === 'MATCH' || r === 'MISMATCH' ? r : 'pending'); function CheckerName({ checker }: { checker: string }) { return hasLabel(`checker.${checker}`) ? : {checker}; } export { CheckerName }; function Legend() { return ( ); } function TileInner({ k, result, who }: { k: number; result: string; who: string }) { return ( <> {' '} ); } /** 37 tiles. Interactive: links to each segment's rows before hydration, then real ) : ( // Overview strip and no-JS verification: each tile opens that segment's recorded row. {inner} )} ); })} ); const independentRow = lanes ? (
    {tiles.map((t, k) => { const indep = t.checks.map((i) => data.verifications.rows[i]).find((r) => r?.checkedBy === 'independent'); const result = indep?.result ?? 'NOT_RUN'; const who = indep ? 'independent' : 'pending'; return (
  1. {' '}
  2. ); })}
) : null; return (
{lanes ? (
{projectRow}
{independentRow}
) : projectRow} {interactive ? (
{selected ? ( <>

    {selected.checks.map((i) => (
  • {' '}
  • ))}
) : (

)}
) : null} {interactive ? (
{tiles.map((t, k) => ( ))}
{t.checkedBy === 'pending' ? : } {t.checks.map((i, j) => ( {j ? ' ' : ''} ))}
) : null}
); }