From abd06f272be2b5c39399123796819e34e6936fb6 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Thu, 13 Oct 2022 21:05:13 -0500 Subject: [PATCH] contract card: show traders instead of volume --- web/components/contract/contract-details.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/web/components/contract/contract-details.tsx b/web/components/contract/contract-details.tsx index 1ed2c49d..a2e35274 100644 --- a/web/components/contract/contract-details.tsx +++ b/web/components/contract/contract-details.tsx @@ -3,6 +3,7 @@ import { ExclamationIcon, PencilIcon, PlusCircleIcon, + UserGroupIcon, } from '@heroicons/react/solid' import clsx from 'clsx' import { Editor } from '@tiptap/react' @@ -50,8 +51,13 @@ export function MiscDetails(props: { hideGroupLink?: boolean }) { const { contract, showTime, hideGroupLink } = props - const { volume, closeTime, isResolved, createdTime, resolutionTime } = - contract + const { + closeTime, + isResolved, + createdTime, + resolutionTime, + uniqueBettorCount, + } = contract const isClient = useIsClient() const isNew = createdTime > Date.now() - DAY_MS && !isResolved @@ -75,8 +81,11 @@ export function MiscDetails(props: { ) : (contract.openCommentBounties ?? 0) > 0 ? ( - ) : volume > 0 || !isNew ? ( - {formatMoney(volume)} bet + ) : !isNew || (uniqueBettorCount ?? 0) > 1 ? ( + + + {uniqueBettorCount} trader{uniqueBettorCount !== 1 ? 's' : ''} + ) : ( )}