mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Fix leaderboard tier criteria using stale cached data
ownEntryPeek() was mixing freshUserSkills() for tier assignment with userSkills() (cached) for tier intervals, causing displayed tier criteria to be out of sync with actual tier assignments. Minor perf trade-off: freshUserSkills() is now called twice in ownEntryPeek(), but this only affects users checking their position beyond the main leaderboard size. Fixes #2588
This commit is contained in:
parent
da603f4d7c
commit
dd9e74d1b6
|
|
@ -1,7 +1,7 @@
|
|||
import { cachified } from "@epic-web/cachified";
|
||||
import * as Seasons from "~/features/mmr/core/Seasons";
|
||||
import { USER_LEADERBOARD_MIN_ENTRIES_FOR_LEVIATHAN } from "~/features/mmr/mmr-constants";
|
||||
import { freshUserSkills, userSkills } from "~/features/mmr/tiered.server";
|
||||
import { freshUserSkills } from "~/features/mmr/tiered.server";
|
||||
import * as UserRepository from "~/features/user-page/UserRepository.server";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { weaponCategories } from "~/modules/in-game-lists/weapon-ids";
|
||||
|
|
@ -157,7 +157,7 @@ export function ownEntryPeek({
|
|||
|
||||
const withTier = addTiers([found], season)[0];
|
||||
|
||||
const { intervals } = userSkills(season);
|
||||
const { intervals } = freshUserSkills(season);
|
||||
|
||||
const currentTierIndex = intervals.findIndex(
|
||||
(interval) =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user