From f0c5ef84e474a0edccdae0c37f32a7348eef1a43 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:39:01 +0100 Subject: [PATCH] fix: "What?" - Richard Nixon --- .../_game/_playtype/folders/SpecificFolderPage.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/client/src/app/pages/dashboard/users/games/_game/_playtype/folders/SpecificFolderPage.tsx b/client/src/app/pages/dashboard/users/games/_game/_playtype/folders/SpecificFolderPage.tsx index 973363170..259e0d367 100644 --- a/client/src/app/pages/dashboard/users/games/_game/_playtype/folders/SpecificFolderPage.tsx +++ b/client/src/app/pages/dashboard/users/games/_game/_playtype/folders/SpecificFolderPage.tsx @@ -431,9 +431,11 @@ function TierlistBreakdown({ game, folderDataset, playtype, reqUser }: InfoProps [tierlist] ); - const tierlistImpl = gptImpl.ratingSystems.find( + // @ts-expect-error Typescript doesn't like our unioning here for some reason + // and i can't be bothered to figure it out + const tierlistImpl: GPTRatingSystem = gptImpl.ratingSystems.find( (rs) => rs.name === tierlist - ) as GPTRatingSystem; + ); if (!tierlistImpl) { return <>(E) no tierlist impl (howd you get here?); @@ -762,9 +764,10 @@ function FolderDatasetAchievedStatus( ) { const tierlistInfo: Record = {}; - const fn = GPT_CLIENT_IMPLEMENTATIONS[`${game}:${playtype}` as GPTString].ratingSystems.find( - (e) => e.name === tierlist - )?.achievementFn as GPTRatingSystem["achievementFn"]; + // @ts-expect-error shut up + const fn: GPTRatingSystem["achievementFn"] = GPT_CLIENT_IMPLEMENTATIONS[ + `${game}:${playtype}` as GPTString + ].ratingSystems.find((e) => e.name === tierlist)?.achievementFn; for (const data of folderDataset) { let achieved: AchievedStatuses;