Skip to content

Commit 84304c4

Browse files
authored
ui(score-card): remove fraction digits from displayed value (#87)
Closes #85. One-line change: `{value.toFixed(2)}` -> `{value}` at line 21 of components/score-card.tsx to render whole numbers instead of two-decimal floats for improved readability, per the task list in the issue. Callers passing already-rounded numbers get the same output; callers that were previously relying on the forced two-decimal format (e.g. for consistent visual alignment of 3.00 vs 2.50) lose that formatting — which is the intended change per the issue. Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
1 parent a7008b6 commit 84304c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/score-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function ScoreCard({ title, value, highlight, subtitle }: ScoreCardProps)
1818
<p className="text-xs uppercase tracking-wide text-muted-foreground">{title}</p>
1919
<div className="flex items-baseline gap-2">
2020
<span className="text-2xl font-semibold text-foreground">
21-
{value.toFixed(2)}
21+
{value}
2222
</span>
2323
{subtitle && (
2424
<span className="text-xs text-muted-foreground leading-tight">{subtitle}</span>

0 commit comments

Comments
 (0)