diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 05bb69c66..a1ff22b5d 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,6 +1,14 @@ --- import { SEO } from 'astro-seo'; -const { title } = Astro.props; + +interface Props { + title?: string; + redirect?: { + path: string; + interval: number; + } +} +const { title, redirect } = Astro.props; import { ClientRouter } from 'astro:transitions'; import LoadScripts from '@components/Scripts.astro'; import SettingsLoader from '@components/settings/Loader.astro'; @@ -51,6 +59,7 @@ import SettingsLoader from '@components/settings/Loader.astro'; ] }} /> + {redirect !== undefined && } diff --git a/src/pages/gs/index.astro b/src/pages/gs/index.astro index a5be7b9ab..228c1a561 100644 --- a/src/pages/gs/index.astro +++ b/src/pages/gs/index.astro @@ -8,12 +8,10 @@ import games from "../../data/games.json"; const images = import.meta.glob<{ default: ImageMetadata }>( '/src/assets/games/*.{jpeg,jpg,png,gif,webp}' ); -if (!GAMES_LINK) { - return Astro.redirect('/'); -} --- - +{!GAMES_LINK && } +{GAMES_LINK && }