Skip to content
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

fix: next themes hydration errors #137

Merged
merged 5 commits into from
Sep 10, 2024

Conversation

InfVlad
Copy link
Collaborator

@InfVlad InfVlad commented Sep 4, 2024

Resolves #134 , resolves #135, resolves #136
Fixed hydration errors:
-Logo component was wrapped in Link component, then wrapped again in Link when used in landing header, causing hydration error element inside element
-The site logo was displaying the Logo while in Dark Theme, now shows as default the white logo, and chages to dark logo if needed
-The theme toggle now renders a placeholder first, then renders the correct icon and works even when the user doesn't have any saved theme in localstorage

Limitations:
-If the user is using light theme and reloads the page, for a few miliseconds while its loading the displayed logo is gonna be the white then change to the dark one.
-Next Themes provider configuration isn't working as expected, when the site is loaded in incognito mode theme is 'system' even when enableSystem = false and defaultTheme = 'dark' or 'light' (default). Related Next Themes Issue:
pacocoursey/next-themes#308

@InfVlad InfVlad requested a review from alvropena as a code owner September 4, 2024 02:06
Copy link

vercel bot commented Sep 4, 2024

@InfVlad is attempting to deploy a commit to the Alvaro Pea's projects Team on Vercel.

A member of the Team first needs to authorize it.

@InfVlad InfVlad changed the title Fix/hydration next themes Fix: hydration next themes Sep 4, 2024
@InfVlad InfVlad changed the title Fix: hydration next themes fix: hydration next themes Sep 4, 2024
@InfVlad InfVlad changed the title fix: hydration next themes fix: next themes hydration errors Sep 4, 2024
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@InfVlad Thank you. We didn't notice this.

@alvropena alvropena merged commit 3bdf56f into alvropena:develop Sep 10, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants