Fix Finance page crash from Tooltip formatter returning array
CI / build-and-push (push) Successful in 34s

Recharts Tooltip formatter should return a string, not a
single-element array which React can't render as a child.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 18:54:39 -04:00
parent 617b29bd85
commit 6659941632
+2 -2
View File
@@ -73,7 +73,7 @@ export function FinancePage() {
<YAxis hide /> <YAxis hide />
<Tooltip <Tooltip
contentStyle={{ backgroundColor: '#1e293b', border: '1px solid #334155', borderRadius: '8px' }} contentStyle={{ backgroundColor: '#1e293b', border: '1px solid #334155', borderRadius: '8px' }}
formatter={(v: number) => [formatMoney(v)]} formatter={(v: number) => formatMoney(v)}
/> />
<Area type="monotone" dataKey="money" stroke="#6366f1" fill="url(#cashGrad)" /> <Area type="monotone" dataKey="money" stroke="#6366f1" fill="url(#cashGrad)" />
</AreaChart> </AreaChart>
@@ -94,7 +94,7 @@ export function FinancePage() {
<YAxis hide /> <YAxis hide />
<Tooltip <Tooltip
contentStyle={{ backgroundColor: '#1e293b', border: '1px solid #334155', borderRadius: '8px' }} contentStyle={{ backgroundColor: '#1e293b', border: '1px solid #334155', borderRadius: '8px' }}
formatter={(v: number) => [formatMoney(v)]} formatter={(v: number) => formatMoney(v)}
/> />
<Line type="monotone" dataKey="revenue" stroke="#22c55e" dot={false} strokeWidth={2} /> <Line type="monotone" dataKey="revenue" stroke="#22c55e" dot={false} strokeWidth={2} />
<Line type="monotone" dataKey="expenses" stroke="#ef4444" dot={false} strokeWidth={2} /> <Line type="monotone" dataKey="expenses" stroke="#ef4444" dot={false} strokeWidth={2} />