Filter out closed markets from most sort options on markets page

This commit is contained in:
James Grugett 2022-03-18 21:07:06 -05:00
parent 758385f044
commit e638bf1b32

View File

@ -258,6 +258,11 @@ export function SearchableGrid(props: {
matches = matches.filter((c) =>
sort === 'resolved' ? c.resolution : !c.resolution
)
// Filter out closed contracts.
if (sort !== 'closed' && sort !== 'resolved') {
matches = matches.filter((c) => !c.closeTime || c.closeTime > Date.now())
}
}
return (