Skip to content

Commit

Permalink
fix: remove hydration error generated by Sentry Spotlight.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ixartz committed Oct 17, 2024
1 parent dcaae5c commit 8b14146
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ export default function RootLayout(props: {
// Using internationalization in Client Components
const messages = useMessages();

// The `suppressHydrationWarning` attribute in <body> is used to prevent hydration errors caused by Sentry Overlay,
// which dynamically adds a `style` attribute to the body tag.

return (
<html lang={props.params.locale}>
<body>
<body suppressHydrationWarning>
<NextIntlClientProvider
locale={props.params.locale}
messages={messages}
Expand Down

0 comments on commit 8b14146

Please sign in to comment.