This commit is contained in:
@@ -40,7 +40,15 @@ export default function RootLayout({
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<html lang="en">
|
||||
// The language lives in localStorage, so the server can't know it; the inline script sets it before first paint
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<head>
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `try{var l=localStorage.getItem('kooltap-lang');if(l==='en'||l==='nl')document.documentElement.lang=l}catch(e){}`,
|
||||
}}
|
||||
/>
|
||||
</head>
|
||||
<body className={inter.className}>
|
||||
<Providers>{children}</Providers>
|
||||
<Script
|
||||
|
||||
Reference in New Issue
Block a user