diff options
| author | Sweepy <git@sweepy.dev> | 2026-01-03 14:22:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-03 19:22:29 +0000 |
| commit | 2a6fe6e6fa52a670bd3a7f01cbfbcf05eb5971fc (patch) | |
| tree | 6f3ecdefa6e688952fcbc83d13b46606092d7f10 /apps | |
| parent | e195f40b14cc797b93f34d705be0fb9af8e97559 (diff) | |
| download | karakeep-2a6fe6e6fa52a670bd3a7f01cbfbcf05eb5971fc.tar.zst | |
fix: stop theme flashes with cloudflare rocket loader (#2340)
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/web/components/theme-provider.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
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() { |
