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 },
...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) {

View File

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