From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Profile image - Next.js Tutorial
From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Profile image
All right, guys. So now we're going to do the profile image. But before I do that, I just want to mention that I had made a mistake by when we created the user model, I had this as models.lowercaseu, where the model name is actually uppercase. So I'm going to go back to that video where we created this and put a little note in. But just in case you guys missed that, just make sure that this is an uppercase U, OK? Because it just screwed everything up. I had to redo the video and dive in and do a little debugging. So just make sure that that's an uppercase. All right, so back to where we were. I'm going to go into the nav bar. And any time you want to get the session in a client-side component, we simply bring in use session, and then we define it here. In fact, I'm going to show you what that gives us. So I'll do a console log right above the return of session. And if we take a look down here, you'll see it's an object that has expires, and then it has this user object, so…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.