From b963cc2fe2a9a2921efa83a1d5845a2a729a5609 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 19 Jan 2022 02:10:54 -0500 Subject: [PATCH] Show close time in feed --- web/components/contract-feed.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/web/components/contract-feed.tsx b/web/components/contract-feed.tsx index 3cdcf1b4..f79784df 100644 --- a/web/components/contract-feed.tsx +++ b/web/components/contract-feed.tsx @@ -235,6 +235,15 @@ function FeedQuestion(props: { contract: Contract }) { description = description.slice(0, i) } + // Currently hidden on mobile; ideally we'd fit this in somewhere. + const closeMessage = + contract.isResolved || !contract.closeTime ? null : ( + + {contract.closeTime > Date.now() ? 'Closes' : 'Closed'} + + + ) + return ( <>
@@ -252,8 +261,9 @@ function FeedQuestion(props: { contract: Contract }) { username={creatorUsername} />{' '} asked + {closeMessage}
- +