Re-order sell button and sale price to be first in bets table
This commit is contained in:
parent
6d3fb8f4ae
commit
858ce10b49
|
@ -409,19 +409,18 @@ export function ContractBetsTable(props: {
|
||||||
)
|
)
|
||||||
|
|
||||||
const { isResolved } = contract
|
const { isResolved } = contract
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx('overflow-x-auto', className)}>
|
<div className={clsx('overflow-x-auto', className)}>
|
||||||
<table className="table-zebra table-compact table w-full text-gray-500">
|
<table className="table-zebra table-compact table w-full text-gray-500">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="p-2">
|
<tr className="p-2">
|
||||||
<th>Date</th>
|
<th></th>
|
||||||
|
<th>{isResolved ? <>Payout</> : <>Sale price</>}</th>
|
||||||
<th>Outcome</th>
|
<th>Outcome</th>
|
||||||
<th>Amount</th>
|
<th>Amount</th>
|
||||||
<th>Probability</th>
|
<th>Probability</th>
|
||||||
<th>Shares</th>
|
<th>Shares</th>
|
||||||
<th>{isResolved ? <>Payout</> : <>Sale price</>}</th>
|
<th>Date</th>
|
||||||
<th></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -471,7 +470,12 @@ function BetRow(props: { bet: Bet; contract: Contract; saleBet?: Bet }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr>
|
<tr>
|
||||||
<td>{dayjs(createdTime).format('MMM D, h:mma')}</td>
|
<td className="text-neutral">
|
||||||
|
{!isResolved && !isClosed && !isSold && !isAnte && (
|
||||||
|
<SellButton contract={contract} bet={bet} />
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
|
<td>{saleDisplay}</td>
|
||||||
<td>
|
<td>
|
||||||
<OutcomeLabel outcome={outcome} />
|
<OutcomeLabel outcome={outcome} />
|
||||||
</td>
|
</td>
|
||||||
|
@ -480,13 +484,7 @@ function BetRow(props: { bet: Bet; contract: Contract; saleBet?: Bet }) {
|
||||||
{formatPercent(probBefore)} → {formatPercent(probAfter)}
|
{formatPercent(probBefore)} → {formatPercent(probAfter)}
|
||||||
</td>
|
</td>
|
||||||
<td>{formatWithCommas(shares)}</td>
|
<td>{formatWithCommas(shares)}</td>
|
||||||
<td>{saleDisplay}</td>
|
<td>{dayjs(createdTime).format('MMM D, h:mma')}</td>
|
||||||
|
|
||||||
{!isResolved && !isClosed && !isSold && !isAnte && (
|
|
||||||
<td className="text-neutral">
|
|
||||||
<SellButton contract={contract} bet={bet} />
|
|
||||||
</td>
|
|
||||||
)}
|
|
||||||
</tr>
|
</tr>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user