-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defaultTheme did't work in the latest Chrome for macOS #240
Comments
Any update on this? |
Same issue here |
Hot fix for now... Does the trick though! 'use client'
import { ThemeProvider, useTheme } from 'next-themes'
import { useEffect } from 'react'
export function DarkThemeProvider({ children }: { children: React.ReactNode }) {
const { setTheme, theme } = useTheme()
useEffect(() => {
setTheme('dark')
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [theme])
return (
<ThemeProvider
attribute="class"
defaultTheme="dark"
disableTransitionOnChange
>
{children}
</ThemeProvider>
)
} |
@ethanleifer does not work for me 100%. I used Updated: I'm using the ThemeProvider in the _app.tsx. |
Forced theme wasn't working for me either |
Same here. Workaround from @ethanleifer worked. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works on Safari and ios Chrome(Version 119.0.6045.199 (Official Build) (arm64))
I don't know if I report this issue here. It has troubled me for a long time.
The text was updated successfully, but these errors were encountered: