You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using NextJS 14 with the app router. It doesn't work to toggle setTheme so I logged useTheme() and it's only returning and empty themes array and the setTheme function. That's it! The themes array should include: 'light', 'dark' & 'systemTheme.'
It should return six key/value repairs but it's returning two. theme, resolvedTheme, forcedTheme & systemTheme are all missing.
I am using NextJS 14 with the app router. It doesn't work to toggle setTheme so I logged useTheme() and it's only returning and empty themes array and the setTheme function. That's it! The themes array should include: 'light', 'dark' & 'systemTheme.'
It should return six key/value repairs but it's returning two. theme, resolvedTheme, forcedTheme & systemTheme are all missing.
layout.tsx:
Providers.jsx:
Navbar.jsx (has the toggle):
The button always defaults to 'dark' because 'theme' from useTheme() isn't returned from the function call and consequently is 'undefined'.
The only way I can get the theme to change is if I manually go into dev tools and change data-theme to 'light'.
The text was updated successfully, but these errors were encountered: