Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useSession must be wrapped in a <SessionProvider /> #68

Open
Prasanna-cpu opened this issue Oct 2, 2023 · 1 comment
Open

useSession must be wrapped in a <SessionProvider /> #68

Prasanna-cpu opened this issue Oct 2, 2023 · 1 comment

Comments

@Prasanna-cpu
Copy link

I am getting this error, I would love for you to clarify
image

@Camden-Croy
Copy link

In layout.js you need to wrap everything in the body with which is the element that just wraps all children in

`



    <main className='app'>
      <Nav />
      {children}
    </main>
  </Provider>
</body>`

`"use client";

import { SessionProvider } from "next-auth/react";

const Provider = ({ children, session }) => (

{children}

)

export default Provider;`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants