79119844

Date: 2024-10-23 22:07:20
Score: 5
Natty:
Report link

I have having the same problem

export default async function RootLayout(props: RootLayoutProps) {
  const { children } = props;

  const params = await props.params;
  const { locale } = params;

  const messages = await getMessages();

  return (
    <html lang={locale}>
      <Head>
        <meta
          name='viewport'
          content={`width=${viewport.width}, initial-scale=${viewport.initialScale}, maximum-scale=${viewport.maximumScale}, user-scalable=${viewport.userScalable ? 'yes' : 'no'}`}
        />
      </Head>
      <body className={`${inter.className}`}>
        <StoreProvider>
          <ApolloWrapper>
            <NextIntlClientProvider locale={locale} messages={messages}>
              <AuthenticationGuard>
                <ThemeProvider
                  attribute='class'
                  defaultTheme='system'
                  enableSystem
                  disableTransitionOnChange
                >
                  {children}
                  <Toaster />
                </ThemeProvider>
              </AuthenticationGuard>
            </NextIntlClientProvider>
          </ApolloWrapper>
        </StoreProvider>
      </body>
    </html>
  );
}

For some reason it being caused by if I remove it those hydration error go away but I don't want to because I want to be able to do themes anyone else found a solution?

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): having the same problem
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Glen Doci