feat(deck): format millions as $X.XXMM in fmtUsd

The raise total now shows $1.85MM instead of $1,850k on the raise and ask
slides; sub-million figures (category subtotals) stay in $k.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Patrick Mulligan 2026-07-28 18:52:43 +02:00
commit c645ca1e5f

View file

@ -384,11 +384,14 @@ export const roadmap = [
}, },
] ]
/** Formatting helpers used across slides. */ /** Formatting helpers used across slides. Millions render as $X.XXMM. */
export const fmtUsd = (n: number) => export const fmtUsd = (n: number) => {
n >= 1000 if (n >= 1_000_000)
? `$${(n / 1000).toLocaleString('en-US', { maximumFractionDigits: n % 1000 === 0 ? 0 : 1 })}k` return `$${(n / 1_000_000).toLocaleString('en-US', { maximumFractionDigits: 2 })}MM`
: `$${n.toLocaleString('en-US')}` if (n >= 1000)
return `$${(n / 1000).toLocaleString('en-US', { maximumFractionDigits: n % 1000 === 0 ? 0 : 1 })}k`
return `$${n.toLocaleString('en-US')}`
}
export const fmtUsdFull = (n: number) => `$${n.toLocaleString('en-US')}` export const fmtUsdFull = (n: number) => `$${n.toLocaleString('en-US')}`