From f3b2ba85747cf79e6ec5b0c8ffca6b7f3abc7ec7 Mon Sep 17 00:00:00 2001 From: Tom Robiquet Date: Fri, 16 Feb 2024 11:04:12 +0200 Subject: [PATCH] styling --- pages/leaderboard/[period].tsx | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pages/leaderboard/[period].tsx b/pages/leaderboard/[period].tsx index b10e0e4e9..417244424 100644 --- a/pages/leaderboard/[period].tsx +++ b/pages/leaderboard/[period].tsx @@ -614,19 +614,25 @@ const MarketBreakdownModal = ({ markets }: { markets: MarketSummary[] }) => { <> setIsOpen(false)}> - -
- total:{" "} - {markets.reduce((prev, curr) => { - return prev + curr.profit; - }, 0)} -
+ +
Market Profit Breakdown
{markets .sort((a, b) => b.profit - a.profit) .map((market, index) => ( -
-
{market.question}
-
${market.profit.toFixed(2)}
+
+ + {market.question} + +
0 ? "text-green-600" : "text-red-600" + }`} + > + ${market.profit.toFixed(2)} +
))}