mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-01 19:38:13 +03:00
Use different images for different games
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export default function GamesPage() {
|
||||
return <div></div>;
|
||||
}
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user