diff --git a/apps/demo_web/src/app/layout.tsx b/apps/demo_web/src/app/layout.tsx index cf9e4e9f1..428e1d973 100644 --- a/apps/demo_web/src/app/layout.tsx +++ b/apps/demo_web/src/app/layout.tsx @@ -6,6 +6,8 @@ import "@oko-wallet/oko-common-ui/styles/colors.scss"; import "@oko-wallet/oko-common-ui/styles/typography.scss"; import "@oko-wallet/oko-common-ui/styles/shadow.scss"; +import { themeInitScript } from "@oko-wallet-demo-web/state/theme"; + const geistSans = Geist({ variable: "--font-geist-sans", subsets: ["latin"], @@ -47,10 +49,14 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - + // To prevent flickering in dark mode or light mode in Next.js, an inline script is required. + // The reason is that even when using LayoutEffect in React, it executes after hydration. + + +