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.

Property details component

Property details component

All right, in the last video, we set this property header image. We brought in all the hard-coded HTML. So what I want to do now is get this part dynamic, because we have the property data. I also want to bring in the icons that we need. And then this stuff on the side, we'll take care of later. We'll turn those into components later on. I think this area, we should put in a separate component called property details. So let's do that. So in Components, we'll create a new file, Property Details. And then what we're going to do is grab the main tag. So let's see. This main tag right here, we're going to take that and then everything in it, which goes down to here. So we're going to cut that. And then we'll bring that into the property details. Let's paste that in there. And then we'll go back to the page and bring in the property details component. And then we're going to put it right where we took it from, which is right above the sidebar. And of course, we need to pass the property…

Contents