fix: stat cards show full dollar amounts under $100k, k-suffix only at $100k+

This commit is contained in:
Krao Hasanee
2026-06-02 10:41:05 -04:00
parent 958f451836
commit 30838e8da3
+1 -1
View File
@@ -518,7 +518,7 @@ export default function Invoices() {
const yp = chartData.reduce((s, m) => s + m.Profit, 0);
const ye = chartData.reduce((s, m) => s + m.Expenses, 0);
const yo = chartData.reduce((s, m) => s + m.Outstanding, 0);
const fmt = v => v >= 1000 ? `$${(v/1000).toFixed(1)}k` : `$${v.toFixed(0)}`;
const fmt = v => v >= 100000 ? `$${(v/1000).toFixed(0)}k` : `$${v.toFixed(2)}`;
const CARD = { background: 'var(--card-bg)', border: '1px solid var(--border)', borderRadius: 8, padding: '18px 21px', backdropFilter: 'blur(12px)', WebkitBackdropFilter: 'blur(12px)' };
const StatCard = ({ label, value, sub, iconBg, iconColor, iconSvg }) => (
<div style={{ ...CARD, display: 'flex', alignItems: 'stretch', gap: 21, minHeight: 120 }}>