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.
Single property page - Next.js Tutorial
From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Single property page
All right, guys. So now we want to do the single property display. We're already fetching the data. We have it in our property state. So it's going to end up looking like this. Now, right now, we're going to put everything in. But the stuff like on the side, the bookmark, share, contact form, that's just going to be hard-coded HTML for now. And then later, we'll break it up into separate components with separate functionality. The main image, I want to put into its own component called property header image. Then we'll have all the data here for the property. The map we'll do later. The images and light boxes, we'll do that later as well. So I just want the main info and the header right now. Now there is a lot of HTML to copy, So I may include in this video or in this section just the finished page.jsx file, just so if you guys don't want to copy all the HTML. But let's get started. I'm going to create a separate component for the property image header, like I said. Let's go back to…
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)
-
-
-
-
-
-
-