diff --git a/web/src/components/CompetitionPage.tsx b/web/src/components/CompetitionPage.tsx
index a72f6dfb..bc549e38 100644
--- a/web/src/components/CompetitionPage.tsx
+++ b/web/src/components/CompetitionPage.tsx
@@ -73,8 +73,8 @@ export function CompetitionPage() {
{t('leader', language)}
{leader?.trader_name}
-
= 0 ? '#0ECB81' : '#F6465D' }}>
- {leader.total_pnl >= 0 ? '+' : ''}{leader.total_pnl_pct.toFixed(2)}%
+
= 0 ? '#0ECB81' : '#F6465D' }}>
+ {(leader?.total_pnl ?? 0) >= 0 ? '+' : ''}{leader?.total_pnl_pct?.toFixed(2) || '0.00'}%
@@ -139,7 +139,7 @@ export function CompetitionPage() {
{t('equity', language)}
- {trader.total_equity.toFixed(2)}
+ {trader.total_equity?.toFixed(2) || '0.00'}
@@ -148,13 +148,13 @@ export function CompetitionPage() {
{t('pnl', language)}
= 0 ? '#0ECB81' : '#F6465D' }}
+ style={{ color: (trader.total_pnl ?? 0) >= 0 ? '#0ECB81' : '#F6465D' }}
>
- {trader.total_pnl >= 0 ? '+' : ''}
- {trader.total_pnl_pct.toFixed(2)}%
+ {(trader.total_pnl ?? 0) >= 0 ? '+' : ''}
+ {trader.total_pnl_pct?.toFixed(2) || '0.00'}%
- {trader.total_pnl >= 0 ? '+' : ''}{trader.total_pnl.toFixed(2)}
+ {(trader.total_pnl ?? 0) >= 0 ? '+' : ''}{trader.total_pnl?.toFixed(2) || '0.00'}
@@ -226,8 +226,8 @@ export function CompetitionPage() {
>
{trader.trader_name}
- = 0 ? '#0ECB81' : '#F6465D' }}>
- {trader.total_pnl >= 0 ? '+' : ''}{trader.total_pnl_pct.toFixed(2)}%
+
= 0 ? '#0ECB81' : '#F6465D' }}>
+ {(trader.total_pnl ?? 0) >= 0 ? '+' : ''}{trader.total_pnl_pct?.toFixed(2) || '0.00'}%
{isWinning && gap > 0 && (