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

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…

Contents