From 92b368f11e5a4fd49cdfe3454c5c853efd3f6125 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 14 Jun 2022 11:27:11 -0500 Subject: [PATCH] Fix sorting for Your bets table --- web/components/bets-list.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index d227ac88..906f3af5 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -482,7 +482,10 @@ export function ContractBetsTable(props: { }) { const { contract, className, isYourBets } = props - const bets = props.bets.filter((b) => !b.isAnte) + const bets = sortBy( + props.bets.filter((b) => !b.isAnte), + (bet) => bet.createdTime + ).reverse() const [sales, buys] = partition(bets, (bet) => bet.sale)