From 583dc10e6ac0668442da46e0a8cdabda50076767 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 3 Jan 2022 23:41:52 -0800 Subject: [PATCH] Don't prematurely show close times in feed --- web/components/contract-feed.tsx | 2 +- web/components/contract-overview.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/components/contract-feed.tsx b/web/components/contract-feed.tsx index 49671d4c..c663fa46 100644 --- a/web/components/contract-feed.tsx +++ b/web/components/contract-feed.tsx @@ -429,7 +429,7 @@ export function ContractFeed(props: { contract: Contract }) { { type: 'start', id: 0 }, ...group(bets, comments, user?.id), ] - if (contract.closeTime) { + if (contract.closeTime && contract.closeTime <= Date.now()) { allItems.push({ type: 'close', id: `${contract.closeTime}` }) } if (contract.resolution) { diff --git a/web/components/contract-overview.tsx b/web/components/contract-overview.tsx index 85dd97df..72fa3dff 100644 --- a/web/components/contract-overview.tsx +++ b/web/components/contract-overview.tsx @@ -67,8 +67,6 @@ export const ContractOverview = (props: { - - {/* Show a delete button for contracts without any trading */} {isCreator && truePool === 0 && ( <> @@ -86,9 +84,11 @@ export const ContractOverview = (props: { )} + + - + ) }