fix map loaded twice

This commit is contained in:
vcoppe
2024-07-18 16:32:36 +02:00
parent 25ea9607f2
commit 06e6d7e81e
3 changed files with 22 additions and 18 deletions

View File

@@ -13,19 +13,21 @@
}
const appRoutes = ['/[...language]/app', '/[...language]/embed'];
$: showNavAndFooter = $page.route.id === null || !appRoutes.includes($page.route.id);
</script>
<Head />
<ModeWatcher />
{#if !$isLoading}
{#if $page.route.id !== null && appRoutes.includes($page.route.id)}
<slot />
{:else}
{#if showNavAndFooter}
<Nav />
<main>
<slot />
</main>
{/if}
<main>
<slot />
</main>
{#if showNavAndFooter}
<Footer />
{/if}
{/if}