fix: remove explicit type annotations on Recharts formatter callbacks

TypeScript strict mode in CI rejects explicit parameter types on
Recharts formatter/tickFormatter callbacks. Use inference with
'as number' casts on the value instead. Also fix unsafe cast in
PortfolioComposition and handle possibly-undefined percent.
This commit is contained in:
Celes Renata
2026-04-15 16:17:00 +00:00
parent 4ffde8cc06
commit 516731e69a
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ export function BacktestPanel() {
<Tooltip
contentStyle={{ backgroundColor: '#1e293b', border: '1px solid #334155', borderRadius: 8 }}
labelStyle={{ color: '#9ca3af' }}
formatter={(value: number) => [fmtUsd(value), 'Portfolio Value']}
formatter={(value) => [fmtUsd(value as number), 'Portfolio Value']}
/>
<Line
type="monotone"