File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import "./globals.css";
22import type { ReactNode } from "react" ;
33import type { Metadata } from "next" ;
44import { cookies , headers } from "next/headers" ;
5- import Script from "next/script" ;
65import {
76 DEFAULT_LOCALE ,
87 LOCALE_COOKIE ,
@@ -112,10 +111,13 @@ export default async function RootLayout({ children }: { children: ReactNode })
112111
113112 return (
114113 < html lang = { initialLocale } dir = { dir } suppressHydrationWarning >
114+ < head >
115+ < script
116+ id = "theme-init"
117+ dangerouslySetInnerHTML = { { __html : themeInitScript } }
118+ />
119+ </ head >
115120 < body >
116- < Script id = "theme-init" strategy = "beforeInteractive" >
117- { themeInitScript }
118- </ Script >
119121 < Providers initialLocale = { initialLocale } > { children } </ Providers >
120122 </ body >
121123 </ html >
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
99 attribute = "class"
1010 defaultTheme = "system"
1111 enableSystem
12+ enableColorScheme
1213 storageKey = "devimpact-theme"
1314 >
1415 { children }
You can’t perform that action at this time.
0 commit comments