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 page cleanup - Next.js Tutorial
From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Property page cleanup
So now I want to clean up this page a little bit. This is the properties ID page. So if we go to app, properties, brackets ID, page.jsx, we've already moved the main data into this property. Details component, now I want to handle this other stuff, like the bookmark button, the share button, and the contact form. So let's start off with the bookmark button. So we'll leave this aside here. And then let's just take this button and cut it. And then let's create a component called BookmarkButton.jsx. And R-A-F-C-E, BookmarkButton. And then we're going to put this, what we just cut out, put that right here. And then we can go, yeah, we do have an icon to bring in. We'll do that in a second. But let's bring this in here. So we'll say import bookmark button, and then go back down to where we had the button right here. And let's say bookmark button. Now, we want to pass the property in, because the bookmark functionality is going to be in that component. So let's say property, set that 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)
Geocoding and Mapbox map16m 40s
-
(Locked)
Handle geocode error4m 4s
-
(Locked)
Property page cleanup6m 11s
-
(Locked)
Bookmark API route10m 28s
-
(Locked)
Bookmark button request8m 27s
-
(Locked)
Bookmark status and button toggle8m 54s
-
(Locked)
Saved properties page12m 17s
-
(Locked)
Share buttons10m 41s
-
(Locked)
-
-
-