Revert "fix(web): prevent NaN% display in competition gap calculation (#633) …" (#676)

This reverts commit 8db6dc3b06.
This commit is contained in:
Shui
2025-11-06 20:58:13 -05:00
committed by GitHub
parent b98a438843
commit 95af12e3a2

View File

@@ -392,7 +392,7 @@ export function CompetitionPage() {
{sortedTraders.map((trader, index) => { {sortedTraders.map((trader, index) => {
const isWinning = index === 0 const isWinning = index === 0
const opponent = sortedTraders[1 - index] const opponent = sortedTraders[1 - index]
const gap = (trader.total_pnl_pct ?? 0) - (opponent.total_pnl_pct ?? 0) const gap = trader.total_pnl_pct - opponent.total_pnl_pct
return ( return (
<div <div