From 8e751b75e4c330f59f54a8cfaca34819bdbb93b2 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Wed, 24 Nov 2021 02:41:10 +0000 Subject: [PATCH] Recent sessions now properly sort. --- .../dashboard/users/games/_game/_playtype/SessionsPage.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/app/pages/dashboard/users/games/_game/_playtype/SessionsPage.tsx b/client/src/app/pages/dashboard/users/games/_game/_playtype/SessionsPage.tsx index f89e0bd67..215ac17c9 100644 --- a/client/src/app/pages/dashboard/users/games/_game/_playtype/SessionsPage.tsx +++ b/client/src/app/pages/dashboard/users/games/_game/_playtype/SessionsPage.tsx @@ -52,7 +52,11 @@ export default function SessionsPage({ } return res.body - .sort(NumericSOV(x => x.calculatedData[rating] ?? 0, true)) + .sort( + sessionSet === "best" + ? NumericSOV(x => x.calculatedData[rating] ?? 0, true) + : NumericSOV(x => x.timeEnded ?? 0, true) + ) .map((e, i) => ({ ...e, __related: {