From 3dd7b12e719fc9c6e5fef3f77aabb621f60dab03 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Thu, 17 Feb 2022 18:24:10 -0800 Subject: [PATCH] Iconify contract details; show relative closing time --- web/components/contract-card.tsx | 64 ++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/web/components/contract-card.tsx b/web/components/contract-card.tsx index 89c4c7ec..105c80f4 100644 --- a/web/components/contract-card.tsx +++ b/web/components/contract-card.tsx @@ -13,7 +13,7 @@ import { Col } from './layout/col' import dayjs from 'dayjs' import { TrendingUpIcon } from '@heroicons/react/solid' import { DateTimeTooltip } from './datetime-tooltip' -import { ClockIcon } from '@heroicons/react/outline' +import { ClockIcon, DatabaseIcon } from '@heroicons/react/outline' import { fromNow } from '../lib/util/time' import { Avatar } from './avatar' import { Spacer } from './layout/spacer' @@ -48,7 +48,7 @@ export function ContractCard(props: {

{question} @@ -141,17 +141,19 @@ function AbbrContractDetails(props: { {showHotVolume ? ( -

- {' '} - {formatMoney(volume24Hours)} -
+ + {formatMoney(volume24Hours)} + ) : showCloseTime ? ( -
- Closes{' '} - {fromNow(closeTime || 0)} -
+ + + Closes {fromNow(closeTime || 0)} + ) : ( -
{formatMoney(truePool)} pool
+ + {/* */} + {formatMoney(truePool)} pool + )}
@@ -165,20 +167,23 @@ export function ContractDetails(props: { contract: Contract }) { return ( - - - -
+ + + + + + + + -
{createdDate} @@ -204,14 +209,17 @@ export function ContractDetails(props: { contract: Contract }) { } time={closeTime} > - {dayjs(closeTime).format('MMM D, YYYY')} + {dayjs(closeTime).format('MMM D')} ({fromNow(closeTime)}) )} -
+
-
-
{formatMoney(truePool)} pool
+ + + +
{formatMoney(truePool)} pool
+
)