adrianhajdin / project_next_14_ai_prompt_sharing

Next.js recently became the official React framework as outlined in React docs. In this course, you'll learn the most important Next.js concepts and how they fit into the React ecosystem. Finally, you'll put your skills to the test by building a modern full-stack Next 14 application.
https://www.jsmastery.pro/ultimate-next-course
2.58k stars 396 forks source link

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

Open Prasanna-cpu opened 9 months ago

Prasanna-cpu commented 9 months ago

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

Camden-Croy commented 8 months ago

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

`

</body>`

`"use client";

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

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

{children}

)

export default Provider;`