fix: Call `setTheme` function

This commit is contained in:
Leni Aniva 2024-10-15 19:20:08 -07:00
parent 581c122c82
commit 571d54a975
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Moon, Sun } from 'lucide-svelte';
import { theme } from '$lib/theme'
import { theme, setTheme } from '$lib/theme'
function toggleTheme() {
theme.update((currentTheme) => {
@ -14,6 +14,7 @@
} else {
document.documentElement.classList.add('dark');
}
setTheme(newTheme);
return newTheme
})
}