diff options
| author | Adam Soltys <[email protected]> | 2026-02-11 23:23:32 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 23:23:32 -0800 |
| commit | 13f9ef7f26fff64c2bd54c8f9aa14e6ffac67121 (patch) | |
| tree | 076cd631b671ff5ab74dee08c775c20c192ac659 /src/routes/+layout.svelte | |
| parent | 2e61e8abbc318c36969cb5add0c63df81135b4ab (diff) | |
| download | coinos-ui-13f9ef7f26fff64c2bd54c8f9aa14e6ffac67121.tar.gz coinos-ui-13f9ef7f26fff64c2bd54c8f9aa14e6ffac67121.zip | |
fix svelte errors
Diffstat (limited to 'src/routes/+layout.svelte')
| -rw-r--r-- | src/routes/+layout.svelte | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index c1586698..f1091c2f 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -9,11 +9,15 @@ const map = { light: "lofi", dark: "black", system: "system" }; - let { data, children } = $props(); + let { data, children } = $props<any>(); let pathname = $derived(data.pathname); let theme = $derived(data.theme); - $effect(() => ($themeStore = theme)); - $effect(() => (theme = $themeStore)); + $effect(() => { + $themeStore = theme; + }); + $effect(() => { + theme = $themeStore; + }); $effect(() => { const v = map[theme] ?? theme; if (!v || v === "system") { @@ -47,8 +51,7 @@ if (document.visibilityState === "visible") clearBadge(); }); - let hasNotch = typeof window.AndroidNotch !== "undefined"; - if (hasNotch) { + if (window.AndroidNotch) { window.AndroidNotch.getInsetTop( (px) => { document.documentElement.style.setProperty("--safe-area-inset-top", Math.round(px) + "px"); |
