mirror of
https://github.com/revanced/revanced-website.git
synced 2025-05-29 04:40:14 +02:00
fix: use $effect
instead of onMount
This commit is contained in:
parent
eb51ccfd88
commit
bbb999a209
@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { theme } from '$lib/stores';
|
||||
import { onMount, type Snippet } from 'svelte';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
type Props = { children: Snippet };
|
||||
let { children }: Props = $props();
|
||||
|
||||
onMount(() => {
|
||||
$effect(() => {
|
||||
document.documentElement.setAttribute('data-theme', $theme);
|
||||
});
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user