Sort bets reverse-chronologically.
This commit is contained in:
parent
ea1e66bda1
commit
36591539d3
|
@ -44,6 +44,9 @@ export function BetsList(props: { user: User }) {
|
|||
|
||||
if (bets.length === 0) return <div>You have not made any bets yet!</div>
|
||||
|
||||
// Decending creation time.
|
||||
bets.sort((bet1, bet2) => bet2.createdTime - bet1.createdTime)
|
||||
|
||||
const contractBets = _.groupBy(bets, 'contractId')
|
||||
|
||||
const [resolved, unresolved] = _.partition(
|
||||
|
|
|
@ -75,6 +75,9 @@ function BetsSection(props: { contract: Contract; user: User | null }) {
|
|||
|
||||
if (bets === 'loading' || bets.length === 0) return <></>
|
||||
|
||||
// Decending creation time.
|
||||
bets.sort((bet1, bet2) => bet2.createdTime - bet1.createdTime)
|
||||
|
||||
const userBets = user && bets.filter((bet) => bet.userId === user.id)
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue
Block a user