-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Platform
Windows 11
Browser
Brave
Current Behavior
- Bug 1: The ThemeToggle component always displays the Sun icon, even when the app is in dark mode, so users never see the Moon icon.
- Bug 2: Additionally, it triggers a hydration error in the console because useTheme() from next-themes returns different values on the server and client.
Expected Behavior
- Fix 1: The component should correctly display the Sun icon in dark mode and the Moon icon in light mode.
- Fix 2: The theme toggle should not cause any hydration errors when switching between modes or when rendering on the client.
Recurrence Probability
Always
Steps To Reproduce
- Pull and run the latest main branch.
- Navigate to a page that includes the ThemeToggle component.
- Switch between dark and light themes.
- Observe:
- The icon never changes (always Sun).
- The browser console logs a hydration mismatch error.
Anything else?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working


