diff options
| author | Adam Soltys <[email protected]> | 2024-11-07 21:16:25 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-08 09:27:40 -0800 |
| commit | 32fcc461cd43c8907df5e306d520bb671307eab1 (patch) | |
| tree | 0253780c569998b6c1a5f43026586e94916c3fee /src/routes/(static)/+layout.svelte | |
| parent | be5aa52cea1d57c875cfb22d25c6a866b8de2239 (diff) | |
| download | coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.tar.gz coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.zip | |
svelte 5
Diffstat (limited to 'src/routes/(static)/+layout.svelte')
| -rw-r--r-- | src/routes/(static)/+layout.svelte | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/routes/(static)/+layout.svelte b/src/routes/(static)/+layout.svelte index c9bdc091..44310c97 100644 --- a/src/routes/(static)/+layout.svelte +++ b/src/routes/(static)/+layout.svelte @@ -1,13 +1,17 @@ <script> + import { run } from 'svelte/legacy'; + import { SvelteToast } from "@zerodevx/svelte-toast"; import Footer from "$comp/Footer.svelte"; import LandingHeader from "$comp/LandingHeader.svelte"; import { theme as themeStore } from "$lib/store"; - export let data; - let { theme } = data; - $: ({ user } = data); - $: theme = $themeStore; + let { data, children } = $props(); + let { theme } = $state(data); + let { user } = $derived(data); + run(() => { + theme = $themeStore; + }); </script> <SvelteToast options={{ reversed: true, intro: { y: 192 } }} /> @@ -16,6 +20,6 @@ class="container flex px-4 md:px-40 mx-auto min-h-[600px]" data-theme={theme} > - <slot /> + {@render children?.()} </main> <Footer /> |
