Fix modal flash

This commit is contained in:
Jon Staab
2025-04-14 17:13:16 -07:00
parent 394a1e7d30
commit a64eaba45c

View File

@@ -10,15 +10,9 @@
} }
} }
let modal: any = $state.raw()
const hash = $derived($page.url.hash.slice(1)) const hash = $derived($page.url.hash.slice(1))
const hashIsValid = $derived(Boolean($modals[hash])) const hashIsValid = $derived(Boolean($modals[hash]))
const modal = $derived($modals[hash])
$effect(() => {
if ($modals[hash]) {
modal = $modals[hash]
}
})
</script> </script>
<svelte:window onkeydown={onKeyDown} /> <svelte:window onkeydown={onKeyDown} />