fix: Call `setTheme` function
This commit is contained in:
parent
581c122c82
commit
571d54a975
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue