Replace ClientLayout with inline providers in layout.tsx
This commit is contained in:
1 parent
9fc41fffb9
commit
7a96380ae9
1 file changed
+19
-4
+19
-4
@@ -1,6 +1,8 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Geist, Geist_Mono } from "next/font/google";
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
import ClientLayout from "@/components/ClientLayout";
|
import { ThemeProvider } from 'next-themes';
|
||||||
|
import { AuthProvider } from '@/context/AuthContext';
|
||||||
|
import { Toaster } from 'react-hot-toast';
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
|
||||||
const geistSans = Geist({
|
const geistSans = Geist({
|
||||||
@@ -55,9 +57,22 @@ export default function RootLayout({
|
|||||||
<body
|
<body
|
||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||||
>
|
>
|
||||||
<ClientLayout>
|
<ThemeProvider attribute="class" defaultTheme="dark">
|
||||||
{children}
|
<AuthProvider>
|
||||||
</ClientLayout>
|
{children}
|
||||||
|
<Toaster
|
||||||
|
position="top-right"
|
||||||
|
toastOptions={{
|
||||||
|
duration: 4000,
|
||||||
|
style: {
|
||||||
|
background: '#1f2937',
|
||||||
|
color: '#fff',
|
||||||
|
border: '1px solid #374151',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</AuthProvider>
|
||||||
|
</ThemeProvider>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user