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.

Review form dialog

Review form dialog

All right guys, so now we're gonna add our form our review form, so we don't have our actions yet So it's not gonna work But I want to get it displayed and we're gonna display in a dialogue and just to show you what that looks like if we go To the final product here and we click on this button here write a review Then a form opens and if you have already written a review it'll show here like it is right now So what have it'll have a title a description and then a drop-down for your you know however many stars you want to give it. So let's start on that. We're going to create a new component. I'm going to put it alongside the review list because it's going to be embedded in the review list. So right here, product slug. Let's create a new component, new file called review-form.tsx, and we'll say sfc review form. And it's going to be a client component. So let's say use client. And then as far as props, it's going to take in the user ID, the product ID, and it's also going to take in a…

Contents