diff --git a/web/components/contract/contract-info-dialog.tsx b/web/components/contract/contract-info-dialog.tsx index 9541db54..232f4a67 100644 --- a/web/components/contract/contract-info-dialog.tsx +++ b/web/components/contract/contract-info-dialog.tsx @@ -21,6 +21,7 @@ import { ShareEmbedButton } from '../share-embed-button' import { TagsInput } from '../tags-input' import { Title } from '../title' import { TweetButton } from '../tweet-button' +import { InfoTooltip } from '../info-tooltip' export function ContractInfoDialog(props: { contract: Contract; bets: Bet[] }) { const { contract, bets } = props @@ -29,11 +30,20 @@ export function ContractInfoDialog(props: { contract: Contract; bets: Bet[] }) { const formatTime = (dt: number) => dayjs(dt).format('MMM DD, YYYY hh:mm a z') - const { createdTime, closeTime, resolutionTime } = contract + const { createdTime, closeTime, resolutionTime, mechanism, outcomeType } = + contract + const tradersCount = uniqBy( bets.filter((bet) => !bet.isAnte), 'userId' ).length + + const typeDisplay = + outcomeType === 'BINARY' + ? 'YES / NO' + : outcomeType === 'FREE_RESPONSE' + ? 'Free response' + : 'Numeric' return ( <> @@ -69,8 +79,31 @@ export function ContractInfoDialog(props: { contract: Contract; bets: Bet[] }) {
Stats
+ + + + + + + + + + + @@ -106,7 +139,9 @@ export function ContractInfoDialog(props: { contract: Contract; bets: Bet[] }) { - +
Type{typeDisplay}
Payout + {mechanism === 'cpmm-1' ? ( + <> + Fixed{' '} + + + ) : ( +
+ Parimutuel{' '} + +
+ )} +
Market created {formatTime(createdTime)}
Pool + {mechanism === 'cpmm-1' ? 'Liquidity pool' : 'Betting pool'} + {contractPool(contract)}