diff options
| author | Adam Soltys <[email protected]> | 2024-11-08 23:38:55 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-08 23:38:55 -0800 |
| commit | d47895ec4d54feef1114029ba11188362fa1222d (patch) | |
| tree | 5ee5a223231e87f633e335890fa9f8f0a0c2c170 /src/routes/+layout.svelte | |
| parent | 330e1dd77ab59084a831508e1dab103fd601dc49 (diff) | |
| download | coinos-ui-d47895ec4d54feef1114029ba11188362fa1222d.tar.gz coinos-ui-d47895ec4d54feef1114029ba11188362fa1222d.zip | |
default light theme
Diffstat (limited to 'src/routes/+layout.svelte')
| -rw-r--r-- | src/routes/+layout.svelte | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index a2dc3bff..e7baa137 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,5 +1,5 @@ <script> - import { run } from 'svelte/legacy'; + import { run } from "svelte/legacy"; import { browser } from "$app/environment"; import { PUBLIC_DOMAIN } from "$env/static/public"; @@ -11,15 +11,12 @@ let { data, children } = $props(); let { pathname, theme } = $state(data); $themeStore = theme; + $effect(() => (theme = $themeStore)); let host = PUBLIC_DOMAIN.includes("localhost") ? `http://${PUBLIC_DOMAIN}` : `https://${PUBLIC_DOMAIN}`; - run(() => { - theme = $themeStore - }); - onMount(() => { if (!browser) return; window.addEventListener("beforeinstallprompt", (event) => { |
