diff --git a/frontend/src/pages/BacktestDetail.tsx b/frontend/src/pages/BacktestDetail.tsx index 5026ff2..f83504b 100644 --- a/frontend/src/pages/BacktestDetail.tsx +++ b/frontend/src/pages/BacktestDetail.tsx @@ -237,18 +237,23 @@ const BacktestDetail: React.FC = () => { dataIndex: 'fee', key: 'fee', width: 120, - render: (value: string) => formatUSDC(value) + render: (value: string) => formatUSDC(value || '0') }, { title: t('backtest.profitLoss') + ' (USDC)', dataIndex: 'profitLoss', key: 'profitLoss', width: 120, - render: (value: string | null) => value ? ( - = 0 ? '#52c41a' : '#ff4d4f' }}> - {formatUSDC(value)} - - ) : '-' + render: (value: string | null) => { + if (!value) return '-' + const num = parseFloat(value) + const color = num > 0 ? '#52c41a' : num < 0 ? '#ff4d4f' : undefined + return ( + + {formatUSDC(value)} + + ) + } }, { title: t('backtest.balanceAfter') + ' (USDC)',