Use different images for different games

This commit is contained in:
zkldi
2021-11-24 14:50:34 +00:00
parent d2aaacf2fc
commit 8a2b8387a6
2 changed files with 4 additions and 5 deletions
@@ -1,5 +0,0 @@
import React from "react";
export default function GamesPage() {
return <div></div>;
}
+4
View File
@@ -15,6 +15,7 @@ import LinkButton from "components/util/LinkButton";
import Loading from "components/util/Loading";
import useApiQuery from "components/util/query/useApiQuery";
import SelectButton from "components/util/SelectButton";
import { BackgroundContext } from "context/BackgroundContext";
import { UGPTSettingsContext, UGPTSettingsContextProvider } from "context/UGPTSettingsContext";
import { UserContext } from "context/UserContext";
import { UserSettingsContext } from "context/UserSettingsContext";
@@ -39,11 +40,14 @@ import { NumericSOV } from "util/sorts";
export default function GameRoutes() {
const { game } = useParams<{ game: string }>();
const { setBackground } = useContext(BackgroundContext);
if (!IsSupportedGame(game)) {
return <ErrorPage statusCode={404} customMessage={`The game ${game} is not supported.`} />;
}
setBackground(ToCDNURL(`/game-banners/${game}`));
const gameConfig = GetGameConfig(game);
return (