From 8e0f6f5ee95edacc17009ca4412aa09572cc844a Mon Sep 17 00:00:00 2001 From: Jeffdev Date: Wed, 4 Mar 2026 11:25:03 -0700 Subject: [PATCH 1/2] Fix most played to use season filters --- src/app/(home)/players/[id]/user.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/(home)/players/[id]/user.tsx b/src/app/(home)/players/[id]/user.tsx index fd3e9e3..ab891e2 100644 --- a/src/app/(home)/players/[id]/user.tsx +++ b/src/app/(home)/players/[id]/user.tsx @@ -299,28 +299,28 @@ function UserInfoComponent() { : 0 const mostPlayedRanked = useMemo(() => { - return getMostPlayed(games.filter((g) => g.gameType === 'ranked')) - }, [games]) + return getMostPlayed(seasonFilteredGames.filter((g) => g.gameType === 'ranked')) + }, [seasonFilteredGames]) const mostPlayedSmallworld = useMemo(() => { return getMostPlayed( - games.filter((g) => g.gameType.toLowerCase() === 'smallworld') + seasonFilteredGames.filter((g) => g.gameType.toLowerCase() === 'smallworld') ) - }, [games]) + }, [seasonFilteredGames]) const mostPlayedVanilla = useMemo(() => { - const vanillaGames = games.filter( + const vanillaGames = seasonFilteredGames.filter( (g) => g.gameType.toLowerCase() === 'vanilla' ) return getMostPlayed(vanillaGames) - }, [games]) + }, [seasonFilteredGames]) const mostPlayedLegacy = useMemo(() => { - const legacyGames = games.filter( + const legacyGames = seasonFilteredGames.filter( (g) => g.gameType.toLowerCase() === 'legacy' ) return getMostPlayed(legacyGames) - }, [games]) + }, [seasonFilteredGames]) const seasonNumber = Number(season.replace('season', '')) From 2b6b74a04b8a542b0183a3a1add6174c88429c43 Mon Sep 17 00:00:00 2001 From: Jeffdev Date: Wed, 4 Mar 2026 12:02:24 -0700 Subject: [PATCH 2/2] Update user.tsx --- src/app/(home)/players/[id]/user.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/(home)/players/[id]/user.tsx b/src/app/(home)/players/[id]/user.tsx index ab891e2..c886be9 100644 --- a/src/app/(home)/players/[id]/user.tsx +++ b/src/app/(home)/players/[id]/user.tsx @@ -299,12 +299,16 @@ function UserInfoComponent() { : 0 const mostPlayedRanked = useMemo(() => { - return getMostPlayed(seasonFilteredGames.filter((g) => g.gameType === 'ranked')) + return getMostPlayed( + seasonFilteredGames.filter((g) => g.gameType === 'ranked') + ) }, [seasonFilteredGames]) const mostPlayedSmallworld = useMemo(() => { return getMostPlayed( - seasonFilteredGames.filter((g) => g.gameType.toLowerCase() === 'smallworld') + seasonFilteredGames.filter( + (g) => g.gameType.toLowerCase() === 'smallworld' + ) ) }, [seasonFilteredGames])