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.
Featured property component - Next.js Tutorial
From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Featured property component
OK, so now we want to finish up our featured properties. We just have some hard-coded HTML here now. So what we're going to want to do is take one of these cards, which begin with the div with the BG white, and we want to cut that. So this div ends right here. So let's grab that. So again, it's going to be the BG white that's directly in the grid. So let's cut that one, and then I'm going to delete the other one. So that one ends right here. Get rid of that. All right, so basically, we should just have the H2 and then have this div under it with the grid classes. Now in components, I'm going to create a new one called featuredPropertyCard.jsx. Now, you could use the property card and then maybe add in a prop and have some conditionals where you change the layout to look like this. You could do that and save yourself a new file, but it would also make the property card more complicated. So I figure we just create a new one. So let's say RAFCE, and then I'm going to paste in what we…
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.