Fix closing soon sort

This commit is contained in:
James Grugett 2022-03-19 11:22:24 -05:00
parent f00064732d
commit 47f95678bd

View File

@ -241,7 +241,8 @@ export function SearchableGrid(props: {
matches = _.sortBy(matches, ({ volume24Hours }) => -1 * volume24Hours) matches = _.sortBy(matches, ({ volume24Hours }) => -1 * volume24Hours)
matches = _.sortBy( matches = _.sortBy(
matches, matches,
(contract) => -1 * (contract.closeTime ?? Infinity) (contract) =>
(sort === 'closed' ? -1 : 1) * (contract.closeTime ?? Infinity)
) )
const hideClosed = sort === 'closed' const hideClosed = sort === 'closed'
matches = matches.filter( matches = matches.filter(