Est. Max Payout => Shares in bet table
This commit is contained in:
parent
96d5ea0437
commit
0b9b2396f1
|
@ -5,7 +5,11 @@ import { useEffect, useState } from 'react'
|
||||||
import { useUserBets } from '../hooks/use-user-bets'
|
import { useUserBets } from '../hooks/use-user-bets'
|
||||||
import { Bet } from '../lib/firebase/bets'
|
import { Bet } from '../lib/firebase/bets'
|
||||||
import { User } from '../lib/firebase/users'
|
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 { Col } from './layout/col'
|
||||||
import { Spacer } from './layout/spacer'
|
import { Spacer } from './layout/spacer'
|
||||||
import { Contract, getContractFromId, path } from '../lib/firebase/contracts'
|
import { Contract, getContractFromId, path } from '../lib/firebase/contracts'
|
||||||
|
@ -253,7 +257,7 @@ export function ContractBetsTable(props: {
|
||||||
<th>Outcome</th>
|
<th>Outcome</th>
|
||||||
<th>Amount</th>
|
<th>Amount</th>
|
||||||
<th>Probability</th>
|
<th>Probability</th>
|
||||||
{!isResolved && <th>Est. max payout</th>}
|
<th>Shares</th>
|
||||||
<th>{isResolved ? <>Payout</> : <>Current value</>}</th>
|
<th>{isResolved ? <>Payout</> : <>Current value</>}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -296,7 +300,7 @@ function BetRow(props: { bet: Bet; contract: Contract; sale?: Bet }) {
|
||||||
<td>
|
<td>
|
||||||
{formatPercent(probBefore)} → {formatPercent(probAfter)}
|
{formatPercent(probBefore)} → {formatPercent(probAfter)}
|
||||||
</td>
|
</td>
|
||||||
{!isResolved && <td>{formatMoney(shares)}</td>}
|
<td>{formatWithCommas(shares)}</td>
|
||||||
<td>
|
<td>
|
||||||
{bet.isSold
|
{bet.isSold
|
||||||
? 'N/A'
|
? 'N/A'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user