From e638bf1b32196a255d3e3fa7d617fada2663a75a Mon Sep 17 00:00:00 2001 From: James Grugett Date: Fri, 18 Mar 2022 21:07:06 -0500 Subject: [PATCH] Filter out closed markets from most sort options on markets page --- web/components/contracts-list.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/components/contracts-list.tsx b/web/components/contracts-list.tsx index 5cc8376d..cb003d80 100644 --- a/web/components/contracts-list.tsx +++ b/web/components/contracts-list.tsx @@ -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 (