Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/docs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: ReactNode }) {
// Root layout is only used for redirects with middleware
// The actual layout is in [lang]/layout.tsx
return children;
return (
<html lang="en" suppressHydrationWarning>
<body>{children}</body>
</html>
);
}
Comment on lines +21 to 26
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

This change creates nested HTML structure, which is invalid. Both the root layout (app/layout.tsx) and the child layout (app/[lang]/layout.tsx) now have html and body tags. In Next.js App Router, only the root layout should contain these tags. The [lang]/layout.tsx should be updated to remove its html and body tags and only wrap children with the RootProvider component. This will result in nested HTML like: html > body > html > body, which browsers will not render correctly.

Suggested change
return (
<html lang="en" suppressHydrationWarning>
<body>{children}</body>
</html>
);
}
return children;
}

Copilot uses AI. Check for mistakes.
Loading