This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,42 @@
// Metro module 8491 (f8492).
import GameStore from "../../games/GameStore";
import { Distributors } from "../../../Constants";
import { useStateFromStores } from "../../../_bundle/Module589";
import { SteamReleaseStatus } from "../../../_bundle/Module8492";
import { ThirdPartyGameApplicationWebsiteCategory } from "../../../_bundle/Module8490";
import { isNullOrEmpty } from "../../../utils/StringUtils";
export function buildSteamStoreUrl(a0) {
return `https://store.steampowered.com/app/${encodeURIComponent(a0)}`;
}
export function useSteamWebsiteUrl(a0) {
return useStateFromStores([GameStore], () => {
let r42;
if (a0 == null) {
return null;
}
const game = GameStore.getGame(a0);
if (game == null) {
return null;
}
if (game.steamReleaseStatus === SteamReleaseStatus.RETIRED_ABANDONED) {
return null;
}
const url = game.websites.find((website) => website.category === ThirdPartyGameApplicationWebsiteCategory.STEAM)?.url;
const r25 = game.thirdPartySkus.filter((thirdPartySku) => thirdPartySku.distributor === Distributors.STEAM && !isNullOrEmpty(thirdPartySku.id));
const id = r25[0]?.id;
let r34 = isNullOrEmpty(id) ? null : `https://store.steampowered.com/app/${encodeURIComponent(id)}`;
L16: {
if (r25.length > 1) {
r42 = url;
if (r42 != null) {
break L16;
}
}
if (r34 == null) {
r34 = url ?? null;
}
r42 = r34;
}
return r42;
}, [a0]);
}