fix: theme provider

This commit is contained in:
shinya
2025-06-26 21:07:10 +08:00
parent d677ca9877
commit d9fa4866dc

View File

@@ -1,9 +1,18 @@
'use client';
import type { ThemeProviderProps } from 'next-themes';
import { ThemeProvider as NextThemesProvider } from 'next-themes';
import type { ThemeProviderProps } from 'next-themes/dist/types';
import * as React from 'react';
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
return (
<NextThemesProvider
attribute='class'
defaultTheme='system'
enableSystem
{...props}
>
{children}
</NextThemesProvider>
);
}