Sort by close date
This commit is contained in:
parent
b9a82b652e
commit
c5a5869f21
|
@ -226,6 +226,8 @@ export function SearchableGrid(props: {
|
||||||
matches,
|
matches,
|
||||||
(contract) => -1 * (contract.resolutionTime ?? 0)
|
(contract) => -1 * (contract.resolutionTime ?? 0)
|
||||||
)
|
)
|
||||||
|
} else if (sort === 'close-date') {
|
||||||
|
matches = _.sortBy(matches, (contract) => contract.closeTime)
|
||||||
} else if (sort === 'most-traded') {
|
} else if (sort === 'most-traded') {
|
||||||
matches.sort(
|
matches.sort(
|
||||||
(a, b) => contractMetrics(b).truePool - contractMetrics(a).truePool
|
(a, b) => contractMetrics(b).truePool - contractMetrics(a).truePool
|
||||||
|
@ -266,6 +268,7 @@ export function SearchableGrid(props: {
|
||||||
<option value="most-traded">Most traded</option>
|
<option value="most-traded">Most traded</option>
|
||||||
<option value="newest">Newest</option>
|
<option value="newest">Newest</option>
|
||||||
<option value="resolved">Resolved</option>
|
<option value="resolved">Resolved</option>
|
||||||
|
<option value="close-date">Close date</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ export type Sort =
|
||||||
| 'tag'
|
| 'tag'
|
||||||
| 'newest'
|
| 'newest'
|
||||||
| 'most-traded'
|
| 'most-traded'
|
||||||
|
| 'close-date'
|
||||||
| 'resolved'
|
| 'resolved'
|
||||||
| 'all'
|
| 'all'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user