aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/+layout.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/+layout.svelte')
-rw-r--r--src/routes/+layout.svelte5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 7653e05a..704278b6 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -11,8 +11,9 @@
const map = { light: 'lofi', dark: 'black', system: 'system' };
let { data, children } = $props();
- let { pathname, theme } = $state(data);
- $effect(() => ($themeStore = data.theme));
+ let pathname = $derived(data.pathname);
+ let theme = $derived(data.theme);
+ $effect(() => ($themeStore = theme));
$effect(() => (theme = $themeStore));
$effect(() => {
const v = map[theme] ?? theme;