import { Bar } from '@/components/ui/primitives'; import { fmt } from '@/lib/format'; import { COMPONENT_LABEL, COMPONENT_ORDER, pressureColor } from '@/lib/pressure'; import type { ComponentScores } from '@/lib/types'; /** Static component score grid for scope pages. `null` = not attributable for this scope (shown, never faked). */ export function ComponentGrid({ components }: { components: ComponentScores }) { const ids = COMPONENT_ORDER.filter((c) => c in components); return (
{ids.map((id) => { const v = components[id]; return (
{COMPONENT_LABEL[id]}
{v == null ? 'n/a' : fmt(v)}
); })}
); }