@@ -64,6 +64,47 @@ export function CompetitionPage() {
);
}
+ // 如果有数据返回但没有交易员,显示空状态
+ if (!competition.traders || competition.traders.length === 0) {
+ return (
+
+ {/* Competition Header - 精简版 */}
+
+
+
+
+
+
+
+ {t('aiCompetition', language)}
+
+ 0 {t('traders', language)}
+
+
+
+ {t('liveBattle', language)}
+
+
+
+
+
+ {/* Empty State */}
+
+
+
+ {t('noTraders', language)}
+
+
+ {t('createFirstTrader', language)}
+
+
+
+ );
+ }
+
// 按收益率排序
const sortedTraders = [...competition.traders].sort(
(a, b) => b.total_pnl_pct - a.total_pnl_pct
diff --git a/web/src/components/EquityChart.tsx b/web/src/components/EquityChart.tsx
index bfa89617..e7441779 100644
--- a/web/src/components/EquityChart.tsx
+++ b/web/src/components/EquityChart.tsx
@@ -270,7 +270,23 @@ export function EquityChart({ traderId }: EquityChartProps) {