From 0b9b2396f17055984b3fe6c0b57db1f4fcd85fb9 Mon Sep 17 00:00:00 2001 From: jahooma Date: Fri, 31 Dec 2021 14:13:06 -0600 Subject: [PATCH] Est. Max Payout => Shares in bet table --- web/components/bets-list.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 6b05c689..18c74563 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -5,7 +5,11 @@ import { useEffect, useState } from 'react' import { useUserBets } from '../hooks/use-user-bets' import { Bet } from '../lib/firebase/bets' import { User } from '../lib/firebase/users' -import { formatMoney, formatPercent } from '../lib/util/format' +import { + formatMoney, + formatPercent, + formatWithCommas, +} from '../lib/util/format' import { Col } from './layout/col' import { Spacer } from './layout/spacer' import { Contract, getContractFromId, path } from '../lib/firebase/contracts' @@ -253,7 +257,7 @@ export function ContractBetsTable(props: { Outcome Amount Probability - {!isResolved && Est. max payout} + Shares {isResolved ? <>Payout : <>Current value} @@ -296,7 +300,7 @@ function BetRow(props: { bet: Bet; contract: Contract; sale?: Bet }) { {formatPercent(probBefore)} → {formatPercent(probAfter)} - {!isResolved && {formatMoney(shares)}} + {formatWithCommas(shares)} {bet.isSold ? 'N/A'