We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to invert the colours of an image when the theme is light, this is the code.
export function DarkImage({ ...props }: ImageProps) { const { theme } = useTheme(); if (theme === "dark") { return <Image {...props} className="filter invert" />; } else { return <Image {...props} />; } }
but when the page loads there is inconsistent, but when I toggle theme it works fine. Is there a problem with next-theme or Nextjs 14.
The text was updated successfully, but these errors were encountered:
This is the https://github.com/Sachinv220/chat/tree/ui the above code is only present in the ui branch.
The files that would be related to the current issue are src/components/Logo.tsx src/app/page.tsx src/app/layout.tsx
src/components/Logo.tsx
src/app/page.tsx
src/app/layout.tsx
Sorry, something went wrong.
Could be related to Hydration Mismtach Also there is higher chance of getting help if you create a reproducible on CodeSandBox
Thank You,I will take a look.
No branches or pull requests
I want to invert the colours of an image when the theme is light, this is the code.
but when the page loads there is inconsistent, but when I toggle theme it works fine. Is there a problem with next-theme or Nextjs 14.
The text was updated successfully, but these errors were encountered: