diff --git a/app/layout.tsx b/app/layout.tsx index 9164607..6d70f20 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,9 +1,8 @@ import type { Metadata } from "next"; import "./globals.css"; -import { AuthProvider } from "@/contexts/AuthContext"; import { Toaster } from "react-hot-toast"; import LayoutClient from "./layout-client"; -import { GoogleOAuthProvider } from "@react-oauth/google"; +import { Providers } from "./providers"; export const metadata: Metadata = { title: "Thé Tip Top - Jeu Concours", @@ -35,26 +34,14 @@ export const metadata: Metadata = { }, }; -const googleClientId = process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID || ''; - export default function RootLayout({ children }: { children: React.ReactNode }) { - const content = ( - - {children} - - ); - return ( - {googleClientId ? ( - - {content} - - ) : ( - content - )} - + {children} + + + {children} + + ); + + if (googleClientId) { + return ( + + {content} + + ); + } + + return content; +}