Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// app/providers.tsx (client)
|
||||
'use client';
|
||||
|
||||
import { SessionProvider } from 'next-auth/react';
|
||||
import { ThemeProvider } from 'next-themes';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
type Props = PropsWithChildren<{ session?: any }>;
|
||||
|
||||
export function Providers({ children, session }: Props) {
|
||||
return (
|
||||
<SessionProvider session={session}>
|
||||
<ThemeProvider
|
||||
attribute="class" // toggles `class="dark"` on <html>
|
||||
defaultTheme="dark" // default to dark to match server if you want dark by default
|
||||
enableSystem={false}
|
||||
>
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
</SessionProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user