From 2a6fe6e6fa52a670bd3a7f01cbfbcf05eb5971fc Mon Sep 17 00:00:00 2001
From: Sweepy <git@sweepy.dev>
Date: Sat, 3 Jan 2026 14:22:29 -0500
Subject: fix: stop theme flashes with cloudflare rocket loader (#2340)

---
 apps/web/components/theme-provider.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'apps/web/components/theme-provider.tsx')

diff --git a/apps/web/components/theme-provider.tsx b/apps/web/components/theme-provider.tsx
index 1ab9a49d..1179bdfe 100644
--- a/apps/web/components/theme-provider.tsx
+++ b/apps/web/components/theme-provider.tsx
@@ -5,7 +5,11 @@ import * as React from "react";
 import { ThemeProvider as NextThemesProvider, useTheme } from "next-themes";
 
 export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
-  return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
+  return (
+    <NextThemesProvider scriptProps={{ "data-cfasync": "false" }} {...props}>
+      {children}
+    </NextThemesProvider>
+  );
 }
 
 export function useToggleTheme() {
-- 
cgit v1.2.3-70-g09d2

