function BoolVal({ value }) { if (value === null || value === undefined) { return ; } return ( {value ? 'TRUE' : 'FALSE'} ); } function NumVal({ value, decimals = 0 }) { if (value === null || value === undefined) { return ; } return {decimals > 0 ? Number(value).toFixed(decimals) : value}; } export default function InfoBadges({ metrics, paperState, targetDef }) { const format = metrics?.format; const anchored = metrics?.anchored; const novelty = metrics?.novelty; const completion = metrics?.completion; const regression = metrics?.regression; const efficiency = metrics?.efficiency; return (
format
anchored
novelty
completion
regression
efficiency
{targetDef && ( <>
level LVL {targetDef.level}
creases {targetDef.n_creases}
task {(targetDef.name || '').replace(/_/g, ' ').toUpperCase()}
)}
); }