From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Cart page

Cart page

All right, so now that we're able to add items to our cart, we want to be able to go to the cart page, which right now obviously is not found because we haven't created it yet. And we want to list out our items in ShadCN table. So let's start off by just creating the page. So if we go to App, we're going to put this folder in our root, and it's going to be a folder called Cart. And then in that, let's create a file called page.tsx. And let's do SFC, Enter. And we're going to call this cart page. I think that's what I want. Yeah, we'll call it cart page. And then just for now, let's just say cart here. And we're going to just add the metadata. So let's export const metadata. And set that to an object with the title. And the title we're going to set to Shopping Cart. And let's save it. And now we should be able to go to slash cart and see this. You should see Shopping Cart in your title as well, or in your tab. So now the actual table is going to be in a separate component. But I'm…

Contents