Files
discord-decomp/modules/game_profile/native/utils/getGameProfileWebsiteData.tsx
T
2026-11-01 12:12:55 +02:00

81 lines
3.3 KiB
TypeScript

// Metro module 11934 (f11935).
import { ThirdPartyGameApplicationWebsiteCategory } from "../../../../_bundle/Module8490";
import { GlobeEarthIcon } from "../../../../design/components/Icon/native/redesign/generated/GlobeEarthIcon";
import { GameProfileTrackActionActions } from "../../GameProfileAnalyticUtils";
import { intl, t } from "../../../../intl/index.native";
import { XNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/XNeutralIcon";
import { YoutubeNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/YoutubeNeutralIcon";
import { FacebookNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/FacebookNeutralIcon";
import { InstagramNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/InstagramNeutralIcon";
import { BlueskyNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/BlueskyNeutralIcon";
import { RedditNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/RedditNeutralIcon";
import { TwitchNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/TwitchNeutralIcon";
export default function getGameProfileWebsiteData(a0, a1) {
const category = a0.category;
if (ThirdPartyGameApplicationWebsiteCategory.OFFICIAL === category) {
return {
icon: <GlobeEarthIcon size="md" color={a1} />,
action: GameProfileTrackActionActions.WebsiteLink,
title: intl.string(t.fOUKvg),
url: a0.url
};
}
if (ThirdPartyGameApplicationWebsiteCategory.TWITTER === category) {
return {
icon: <XNeutralIcon size="md" color={a1} />,
action: GameProfileTrackActionActions.XLink,
title: intl.string(t.INic4y),
url: a0.url
};
}
if (ThirdPartyGameApplicationWebsiteCategory.YOUTUBE === category) {
return {
icon: <YoutubeNeutralIcon size="md" color={a1} />,
action: GameProfileTrackActionActions.YouTubeLink,
title: intl.string(t.lNmxbE),
url: a0.url
};
}
if (ThirdPartyGameApplicationWebsiteCategory.FACEBOOK === category) {
return {
icon: <FacebookNeutralIcon size="md" color={a1} />,
action: GameProfileTrackActionActions.FacebookLink,
title: intl.string(t.FjyREK),
url: a0.url
};
}
if (ThirdPartyGameApplicationWebsiteCategory.INSTAGRAM === category) {
return {
icon: <InstagramNeutralIcon size="md" color={a1} />,
action: GameProfileTrackActionActions.InstagramLink,
title: intl.string(t["cgR+IK"]),
url: a0.url
};
}
if (ThirdPartyGameApplicationWebsiteCategory.BLUESKY === category) {
return {
icon: <BlueskyNeutralIcon size="md" color={a1} />,
action: GameProfileTrackActionActions.BlueskyLink,
title: intl.string(t["D/PHq5"]),
url: a0.url
};
}
if (ThirdPartyGameApplicationWebsiteCategory.REDDIT === category) {
return {
icon: <RedditNeutralIcon size="md" color={a1} />,
action: GameProfileTrackActionActions.RedditLink,
title: intl.string(t["Hgb+fc"]),
url: a0.url
};
}
if (ThirdPartyGameApplicationWebsiteCategory.TWITCH === category) {
return {
icon: <TwitchNeutralIcon size="md" color={a1} />,
action: GameProfileTrackActionActions.TwitchLink,
title: intl.string(t["7xtz4G"]),
url: a0.url
};
}
return null;
};