Skip to content

Commit

Permalink
Solve "Warning: Extra attributes from the server: class" error by
Browse files Browse the repository at this point in the history
Suppressing theme's hydration warning in the root <html>
Removing root body
  • Loading branch information
or-schneider committed Jun 6, 2024
1 parent 0c99a49 commit c6d848d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@ export default function RootLayout({
children: React.ReactNode;
params: { locale: string };
}) {
return (
<html lang={locale} dir="rtl">
<body>{children}</body>
</html>
);
return <html suppressHydrationWarning={true}>{children}</html>;
}

0 comments on commit c6d848d

Please sign in to comment.