Skip to content

Commit

Permalink
fix: resolve hydration mismatch in layout component (#1436)
Browse files Browse the repository at this point in the history
>>
>> - Add suppressHydrationWarning to html and body elements
>> - Ensure consistent class naming using cn utility
>> - Fix console warnings about extra class/style attributes
>>
>> This resolves the server/client rendering inconsistency and
>> eliminates hydration warnings in the browser console.
  • Loading branch information
noobpiyush authored Oct 5, 2024
1 parent 01a09fd commit 6946017
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export const metadata: Metadata = siteConfig;

export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<html suppressHydrationWarning={true} lang="en">
<body
suppressHydrationWarning={true}
className={cn(
'min-h-screen bg-background font-satoshi antialiased',
satoshi.variable,
Expand Down

0 comments on commit 6946017

Please sign in to comment.