From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Update profile form

Update profile form

Okay, so we have our user profile action, our update profile action. We have the page here, which is just displaying profile right now. So we want to show the form. We want it to look like this, where we have the e-mail, which will be disabled. You're not going to be able to update the e-mail just because that's your login. You can add that functionality. We might do it later, or we might add some other fields, but right now, we just want to be able to update the user name, okay? So in this video, we'll create the form which is going to be a client component that we embed in the page and then in the next video, we'll do the submission. There's a couple of lines that we need to write in the JWT callback so that when we update the form, the session gets updated and also the token, alright? So let's start off by just bringing a couple of things in to the page. So I want to have a title, so I'm going to bring in the metadata from Next. And let's also bring in, we're going to bring in…

Contents