contract card: show traders instead of volume
This commit is contained in:
parent
ab1c3020da
commit
abd06f272b
|
@ -3,6 +3,7 @@ import {
|
||||||
ExclamationIcon,
|
ExclamationIcon,
|
||||||
PencilIcon,
|
PencilIcon,
|
||||||
PlusCircleIcon,
|
PlusCircleIcon,
|
||||||
|
UserGroupIcon,
|
||||||
} from '@heroicons/react/solid'
|
} from '@heroicons/react/solid'
|
||||||
import clsx from 'clsx'
|
import clsx from 'clsx'
|
||||||
import { Editor } from '@tiptap/react'
|
import { Editor } from '@tiptap/react'
|
||||||
|
@ -50,8 +51,13 @@ export function MiscDetails(props: {
|
||||||
hideGroupLink?: boolean
|
hideGroupLink?: boolean
|
||||||
}) {
|
}) {
|
||||||
const { contract, showTime, hideGroupLink } = props
|
const { contract, showTime, hideGroupLink } = props
|
||||||
const { volume, closeTime, isResolved, createdTime, resolutionTime } =
|
const {
|
||||||
contract
|
closeTime,
|
||||||
|
isResolved,
|
||||||
|
createdTime,
|
||||||
|
resolutionTime,
|
||||||
|
uniqueBettorCount,
|
||||||
|
} = contract
|
||||||
|
|
||||||
const isClient = useIsClient()
|
const isClient = useIsClient()
|
||||||
const isNew = createdTime > Date.now() - DAY_MS && !isResolved
|
const isNew = createdTime > Date.now() - DAY_MS && !isResolved
|
||||||
|
@ -75,8 +81,11 @@ export function MiscDetails(props: {
|
||||||
<FeaturedContractBadge />
|
<FeaturedContractBadge />
|
||||||
) : (contract.openCommentBounties ?? 0) > 0 ? (
|
) : (contract.openCommentBounties ?? 0) > 0 ? (
|
||||||
<BountiedContractBadge />
|
<BountiedContractBadge />
|
||||||
) : volume > 0 || !isNew ? (
|
) : !isNew || (uniqueBettorCount ?? 0) > 1 ? (
|
||||||
<Row className={'shrink-0'}>{formatMoney(volume)} bet</Row>
|
<Row className={'shrink-0'}>
|
||||||
|
<UserGroupIcon className="mr-1 h-4 w-4" />
|
||||||
|
{uniqueBettorCount} trader{uniqueBettorCount !== 1 ? 's' : ''}
|
||||||
|
</Row>
|
||||||
) : (
|
) : (
|
||||||
<NewContractBadge />
|
<NewContractBadge />
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user