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 - Next.js Tutorial
From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
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…
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.
Contents
-
-
-
-
(Locked)
Create MongoDB database8m 44s
-
(Locked)
MongoDB Compass and importing data4m 36s
-
(Locked)
Database connection and Mongoose6m 31s
-
(Locked)
Your first API route6m 5s
-
(Locked)
Property and user models12m 30s
-
(Locked)
Fetch data using server component9m 48s
-
(Locked)
Requests file4m 25s
-
(Locked)
Fetch single property10m 51s
-
(Locked)
Single property page11m 54s
-
(Locked)
Property details component15m 34s
-
(Locked)
Spinner component2m 37s
-
(Locked)
-
-
-
-
-
-
-