From 1942e1c47a3dd2d8df11f64840f7f1b9516c08f2 Mon Sep 17 00:00:00 2001
From: Ian Philips
Date: Wed, 25 May 2022 07:13:33 -0600
Subject: [PATCH] Show just first 3 letters and chosen answer on fr cards
(#318)
* Show just first 3 letters and chosen answer
* 3 dots
* Just show resolved and the chosen answer
* Remove unused truncate & hide resolved except on xs
---
web/components/contract/contract-card.tsx | 38 +++++++++++++++--------
1 file changed, 25 insertions(+), 13 deletions(-)
diff --git a/web/components/contract/contract-card.tsx b/web/components/contract/contract-card.tsx
index 266d1fc2..6f83ccb9 100644
--- a/web/components/contract/contract-card.tsx
+++ b/web/components/contract/contract-card.tsx
@@ -37,6 +37,7 @@ export function ContractCard(props: {
const { showHotVolume, showCloseTime, className } = props
const contract = useContractWithPreload(props.contract) ?? props.contract
const { question, outcomeType } = contract
+ const { resolution } = contract
const marketClosed = (contract.closeTime || Infinity) < Date.now()
const showQuickBet = !(
@@ -73,12 +74,19 @@ export function ContractCard(props: {
{question}
- {outcomeType === 'FREE_RESPONSE' && (
- }
- truncate="long"
- />
- )}
+ {outcomeType === 'FREE_RESPONSE' &&
+ (resolution ? (
+
+ ) : (
+ }
+ truncate="long"
+ />
+ ))}
{resolution ? (
<>
- Resolved
-
+
+ Resolved
+
+ {(resolution === 'CANCEL' || resolution === 'MKT') && (
+
+ )}
>
) : (
topAnswer && (