From 192685e1ce28a5b8635dd03afb306712fc704c45 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Wed, 26 Aug 2026 18:33:30 +0700 Subject: [PATCH] feat(layout): add theme script to prevent light mode flash during hydration --- services/frontend/src/app/layout.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/services/frontend/src/app/layout.tsx b/services/frontend/src/app/layout.tsx index ff4f59c3..fdf53a5a 100644 --- a/services/frontend/src/app/layout.tsx +++ b/services/frontend/src/app/layout.tsx @@ -44,9 +44,21 @@ export default function RootLayout({ return ( + + {/* + Blocking script: apply saved theme (or default "dark") before first + paint so the page never flashes light mode during client-side + navigation or hydration. next-themes will take over after mount. + */} +