feat: tier sorting

This commit is contained in:
TrèsAbhi committed 2026-04-27 19:34:06 -05:00
1 parent b4936bf13b
commit 385cc3b6d2
8 files changed
+64 -7

No files matched your search

@@ -0,0 +1,17 @@
import { api } from "../core/api/dynamic";
import { useAwait } from "./useAwait";
export function useTierCompare() {
const tiers = useAwait(() => api.tiers(), "tiers");
function compare(a: string, b: string) {
const [, tierNameA] = a.split(".");
const [, tierNameB] = b.split(".");
const tierA = tiers.tiers[tierNameA];
const tierB = tiers.tiers[tierNameB];
return tierB.carousel_level - tierA.carousel_level;
}
return compare;
}