diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index a306a020..05ac6dce 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -335,49 +335,37 @@ function ContractBets(props: { - - -
- {formatMoney(metric === 'profit' ? profit : payout)} -
-
- -
- -
+ +
+ {formatMoney(metric === 'profit' ? profit : payout)} +
+ +
- - - - {contract.mechanism === 'cpmm-1' && limitBets.length > 0 && ( - <> -
-
Limit orders
- -
- +
+
Limit orders
+ +
)} - - -
Bets
+
Bets
- - {!isCpmm && ( - -
- Invested -
-
{formatMoney(invested)}
- - )} - {resolution ? ( - -
Payout
-
- {formatMoney(payout)}{' '} - -
- - ) : ( - <> - {isBinary ? ( - <> - -
- Payout if -
-
- {formatMoney(yesWinnings)} -
- - -
- Payout if -
-
- {formatMoney(noWinnings)} -
- - - ) : isPseudoNumeric ? ( - <> - -
- Payout if {'>='} {formatLargeNumber(contract.max)} -
-
- {formatMoney(yesWinnings)} -
- - -
- Payout if {'<='} {formatLargeNumber(contract.min)} -
-
- {formatMoney(noWinnings)} -
- - - ) : ( - -
- Current value -
-
{formatMoney(payout)}
- - )} - - )} + {!isCpmm && ( -
Profit
+
+ Invested +
+
{formatMoney(invested)}
+ + )} + {resolution ? ( + +
Payout
- {formatMoney(profit)} - {isYourBets && - isCpmm && - (isBinary || isPseudoNumeric) && - !isClosed && - !resolution && - hasShares && - sharesOutcome && - user && ( - <> - - {showSellModal && ( - - )} - - )} + {formatMoney(payout)}
-
+ ) : isBinary ? ( + <> + +
+ Payout if +
+
{formatMoney(yesWinnings)}
+ + +
+ Payout if +
+
{formatMoney(noWinnings)}
+ + + ) : isPseudoNumeric ? ( + <> + +
+ Payout if {'>='} {formatLargeNumber(contract.max)} +
+
{formatMoney(yesWinnings)}
+ + +
+ Payout if {'<='} {formatLargeNumber(contract.min)} +
+
{formatMoney(noWinnings)}
+ + + ) : ( + +
+ Current value +
+
{formatMoney(payout)}
+ + )} + ) + +
Profit
+
+ {formatMoney(profit)} + {isYourBets && + isCpmm && + (isBinary || isPseudoNumeric) && + !isClosed && + !resolution && + hasShares && + sharesOutcome && + user && ( + <> + + {showSellModal && ( + + )} + + )} +
+ ) } @@ -787,8 +761,8 @@ function SellButton(props: { contract: Contract; bet: Bet }) { ) } -function ProfitBadge(props: { profitPercent: number }) { - const { profitPercent } = props +function ProfitBadge(props: { profitPercent: number; className?: string }) { + const { profitPercent, className } = props if (!profitPercent) return null const colors = profitPercent > 0 @@ -799,7 +773,8 @@ function ProfitBadge(props: { profitPercent: number }) { {(profitPercent > 0 ? '+' : '') + profitPercent.toFixed(1) + '%'}