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.

Is featured banner

Is featured banner

So now we want to add the Is Featured checkbox and the Banner Image Upload. So one thing I want to do before we handle that is in the, let's see, we want to go in the Zod schema. So Lib, Validators. We have the Is Featured and Banner commented out. We just want to uncomment those because now we're going to use them. So just do that, close that up. And then let's go into our Components, Admin, Product form. And then from here, we'll see we're watching the Images field in the form. We want to do the same for Is Featured and Banner. So let's take this and this and change it to Is Featured. Because it's a checkbox, we want to constantly watch it to see if it's checked or not. And then Banner is basically another image field, right? So we want to watch it so that when we select an image, It will show in the banner box like it does here with the images. And then, let's see, the other thing that we're going to want to do is go down to the is featured. I think we have a comment, which is…

Contents