-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: Next.js hydration warning in layout component #2957
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
base: main
Are you sure you want to change the base?
Conversation
@naaa760 is attempting to deploy a commit to the Onlook Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughAdded the suppressHydrationWarning attribute to the body element in RootLayout within apps/web/client/src/app/layout.tsx. No other logic or control flow changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (8)apps/web/client/src/app/**/*.tsx📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/web/client/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/web/client/src/**/*.tsx📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/web/client/src/app/layout.tsx📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/web/client/src/app/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/web/client/src/app/{page,layout,route}.tsx📄 CodeRabbit inference engine (CLAUDE.md)
Files:
{apps,packages}/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
fixes: #2823
Fixed a hydration mismatch warning that was appearing in the browser console when loading new blank projects. The issue was caused by browser extensions adding attributes to the body element during development, which caused Next.js to detect a mismatch between server-rendered and client-side HTML.
Added
suppressHydrationWarning
to the body element in the layout component to resolve this warning while maintaining all existing functionality.Related Issues
Fixes the reported hydration warning issue with blank projects
Type of Change
Summary by CodeRabbit