diff --git a/web/components/contracts-list.tsx b/web/components/contracts-list.tsx index f9e48636..d758899e 100644 --- a/web/components/contracts-list.tsx +++ b/web/components/contracts-list.tsx @@ -226,6 +226,8 @@ export function SearchableGrid(props: { matches, (contract) => -1 * (contract.resolutionTime ?? 0) ) + } else if (sort === 'close-date') { + matches = _.sortBy(matches, (contract) => contract.closeTime) } else if (sort === 'most-traded') { matches.sort( (a, b) => contractMetrics(b).truePool - contractMetrics(a).truePool @@ -266,6 +268,7 @@ export function SearchableGrid(props: { + diff --git a/web/hooks/use-sort-and-query-params.tsx b/web/hooks/use-sort-and-query-params.tsx index ee0db506..6ff6aa5e 100644 --- a/web/hooks/use-sort-and-query-params.tsx +++ b/web/hooks/use-sort-and-query-params.tsx @@ -5,6 +5,7 @@ export type Sort = | 'tag' | 'newest' | 'most-traded' + | 'close-date' | 'resolved' | 'all'