fix: theme toggle

This commit is contained in:
charles-gauthereau
2026-07-06 08:01:53 +02:00
parent adda02e91f
commit 4c63408094
@@ -20,11 +20,12 @@ const themes = [
] as const
export function ModeToggle() {
const { theme } = useTheme()
const { theme, setTheme } = useTheme()
const [mounted, setMounted] = useState(false)
useEffect(() => setMounted(true), [])
const handleThemeChange = async (newTheme: "light" | "system" | "dark") => {
setTheme(newTheme)
await authClient.updateUser({ theme: newTheme })
}