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.

Orders page

Orders page

Now we want to use the action that we created in the last video to get our orders and keep in mind that we may Have a page search param here because we're going to be using pagination So we'll take that into account So open up your app user orders page dot TSX and I just want to import a few things first So let's import metadata From next we're going to bring in The the get my orders action that we created in the last video So it's going to be from order actions And then we're also going to be using some of the formatting utilities that we created such as format currency we want the format date time and we want the format ID from the utils file and Then let's also bring in link from next link and There's going to be some other table components from ShadCN But we'll just import those as we go because there's quite a few and then let's just add a page title by export const metadata Metadata and set that to an object with title and we'll just say my orders for the title all right, and…

Contents