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