2023-08-16 23:55:57 +08:00
|
|
|
'use client';
|
2023-08-16 23:29:22 +08:00
|
|
|
|
2023-08-16 23:55:57 +08:00
|
|
|
import { ThemeProvider } from 'next-themes';
|
|
|
|
import siteMetadata from '@/data/siteMetadata';
|
2023-08-16 23:29:22 +08:00
|
|
|
|
|
|
|
export function ThemeProviders({ children }: { children: React.ReactNode }) {
|
|
|
|
return (
|
2023-08-16 23:55:57 +08:00
|
|
|
<ThemeProvider
|
|
|
|
attribute="class"
|
|
|
|
defaultTheme={siteMetadata.theme}
|
|
|
|
enableSystem>
|
2023-08-16 23:29:22 +08:00
|
|
|
{children}
|
|
|
|
</ThemeProvider>
|
2023-08-16 23:55:57 +08:00
|
|
|
);
|
2023-08-16 23:29:22 +08:00
|
|
|
}
|