Recent sessions now properly sort.

This commit is contained in:
zkldi
2021-11-24 02:41:10 +00:00
parent 76ccbaf51c
commit 8e751b75e4
@@ -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: {