Don't prematurely show close times in feed

This commit is contained in:
Austin Chen 2022-01-03 23:41:52 -08:00
parent 07ce27f20b
commit 583dc10e6a
2 changed files with 4 additions and 4 deletions

View File

@ -429,7 +429,7 @@ export function ContractFeed(props: { contract: Contract }) {
{ type: 'start', id: 0 }, { type: 'start', id: 0 },
...group(bets, comments, user?.id), ...group(bets, comments, user?.id),
] ]
if (contract.closeTime) { if (contract.closeTime && contract.closeTime <= Date.now()) {
allItems.push({ type: 'close', id: `${contract.closeTime}` }) allItems.push({ type: 'close', id: `${contract.closeTime}` })
} }
if (contract.resolution) { if (contract.resolution) {

View File

@ -67,8 +67,6 @@ export const ContractOverview = (props: {
<Spacer h={12} /> <Spacer h={12} />
<ContractCloseTime contract={contract} />
{/* Show a delete button for contracts without any trading */} {/* Show a delete button for contracts without any trading */}
{isCreator && truePool === 0 && ( {isCreator && truePool === 0 && (
<> <>
@ -86,9 +84,11 @@ export const ContractOverview = (props: {
</> </>
)} )}
<ContractFeed contract={contract} />
<Spacer h={4} /> <Spacer h={4} />
<ContractFeed contract={contract} /> <ContractCloseTime contract={contract} />
</Col> </Col>
) )
} }