Gaming Subscription Project was duplicated from Gaming subscription page
Continue chatting to ask questions about or make changes to it.
The code returns the following error:
A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
- A server/client branch `if (typeof window !== 'undefined')`.
- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
https://react.dev/link/hydration-mismatch
...
<HotReload globalError={[...]} webSocket={WebSocket} staticIndicatorState={{pathname:null, ...}}>
<AppDevOverlayErrorBoundary globalError={[...]}>
<ReplaySsrOnlyErrors>
<DevRootHTTPAccessFallbackBoundary>
<HTTPAccessFallbackBoundary notFound={<NotAllowedRootHTTPFallbackError>}>
<HTTPAccessFallbackErrorBoundary pathname="/" notFound={<NotAllowedRootHTTPFallbackError>} ...>
<RedirectBoundary>
<RedirectErrorBoundary router={{...}}>
<Head>
<__next_root_layout_boundary__>
<SegmentViewNode type="layout" pagePath="layout.tsx">
<SegmentTrieNode>
<link>
<script>
<script>
<RootLayout>
<html lang="en" className="dark">
<body
className="inter_5901b7c6-module__ec5Qua__variable font-sans antialiased"
- data-new-gr-c-s-check-loaded="14.1272.0"
- data-gr-ext-installed=""
>
...
at body (<anonymous>)
at RootLayout (app/layout.tsx:39:7)
37 | return (
38 | <html lang="en" className="dark">
> 39 | <body className={`${inter.variable} font-sans antialiased`}>
| ^
40 | {children}
41 | <Analytics />
42 | </body> (<anonymous>)
Revise the code to address the error.
I was previewing: /
The hydration mismatch was caused by a browser extension (Grammarly) injecting data-gr-ext-installed and data-new-gr-c-s-check-loaded attributes onto the <body> element after server rendering. Adding suppressHydrationWarning to both the <html> and <body> tags tells React to ignore these attribute-level mismatches, which is the standard fix for discrepancies caused by browser extensions or theme scripts.
You can send messages while the preview loads