Invert closed markets sort
This commit is contained in:
parent
7d5d945a20
commit
5f4908b072
|
@ -236,7 +236,10 @@ export function SearchableGrid(props: {
|
|||
matches.sort((a, b) => a.createdTime - b.createdTime)
|
||||
} else if (sort === 'close-date' || sort === 'closed') {
|
||||
matches = _.sortBy(matches, ({ volume24Hours }) => -1 * volume24Hours)
|
||||
matches = _.sortBy(matches, (contract) => contract.closeTime)
|
||||
matches = _.sortBy(
|
||||
matches,
|
||||
(contract) => -1 * (contract.closeTime ?? Infinity)
|
||||
)
|
||||
const hideClosed = sort === 'closed'
|
||||
matches = matches.filter(
|
||||
({ closeTime }) => closeTime && closeTime > Date.now() !== hideClosed
|
||||
|
|
Loading…
Reference in New Issue
Block a user