fix: use MIN_DELTA constant in formatDelta instead of hardcoded 0.05

This commit is contained in:
bymyself
2026-04-15 20:14:24 -07:00
parent a7357123bd
commit 7c4791f59f

View File

@@ -72,7 +72,7 @@ function formatPct(value: number): string {
}
function formatDelta(delta: number): string {
const rounded = Math.abs(delta) < 0.05 ? 0 : delta
const rounded = Math.abs(delta) < MIN_DELTA ? 0 : delta
const sign = rounded >= 0 ? '+' : ''
return sign + rounded.toFixed(1) + '%'
}