diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 85a0cdd..dc9a20a 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -4,11 +4,12 @@ import LogoWithTextHorizontal from "$components/LogoWithTextHorizontal.svelte"; import { page } from "$app/stores"; import "$lib/css/index.css"; + import { onMount } from "svelte"; const excludedRoutesNav = ["/mockup/boot"]; const excludedRoutesBg = ["/mockup"]; - $: isNavExcluded = excludedRoutesNav.some((route) => $page.url.pathname.startsWith(route)); - $: isBgExcluded = excludedRoutesBg.some((route) => $page.url.pathname === route); + $: isNavExcluded = excludedRoutesNav.some((route) => $page.url?.pathname.startsWith(route)); + $: isBgExcluded = excludedRoutesBg.some((route) => $page.url?.pathname === route); {#if !isNavExcluded} diff --git a/src/routes/mockup/boot/[game]/+page.svelte b/src/routes/mockup/boot/[game]/+page.svelte index e5cab4a..6d6448c 100644 --- a/src/routes/mockup/boot/[game]/+page.svelte +++ b/src/routes/mockup/boot/[game]/+page.svelte @@ -3,13 +3,16 @@ import { onMount } from "svelte"; import type { PageData } from "./$types"; import Logo from "$components/Logo.svelte"; + import { page } from "$app/stores"; let shadersDone = 0; const shadersTotal = 8146; export let data: PageData; - - $: game = data.props.games[0]; + $: game = + data.props.games.find( + (g) => g.title.trim().toLowerCase() === $page.params.game.trim().toLowerCase(), + ) || data.props.games[0]; onMount(() => { const interval = setInterval(() => { shadersDone += Math.floor(Math.random() * 150); @@ -44,7 +47,7 @@