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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user