Update context/theme-provider.tsx

This commit is contained in:
kleap-admin 2026-01-16 17:11:02 +00:00
parent b632c58038
commit 095cb24b42
1 changed files with 5 additions and 5 deletions

View File

@ -1,18 +1,18 @@
"use client"; "use client";
import * as React from "react"; import * as React from "react";
import * as NextThemes from "next-themes"; import { ThemeProvider as NextThemesProvider } from "next-themes";
/** /**
* ThemeProvider wrapper for next-themes * ThemeProvider wrapper for next-themes
* Uses namespace import to avoid Turbopack naming collision * next-themes v0.3.0+ changed its export structure.
* (Turbopack has issues when importing and re-exporting the same name) * Using a more robust way to handle types.
*/ */
export function ThemeProvider({ export function ThemeProvider({
children, children,
...props ...props
}: NextThemes.ThemeProviderProps) { }: React.ComponentProps<typeof NextThemesProvider>) {
return ( return (
<NextThemes.ThemeProvider {...props}>{children}</NextThemes.ThemeProvider> <NextThemesProvider {...props}>{children}</NextThemesProvider>
); );
} }