export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body >
<SessionProvider >
<Toaster/>
<RegisterModal/>
<LoginModal/>
<Layouts>
{children}
</Layouts>
</SessionProvider>
</body>
</html>
Help me to extract sessions so that I can pass it to the <SessionProvider>
, I don’t know how to extract the session object. I can have only children.
2
Answers
make a function;
use
layout
context
use in client component