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.

Order details table

Order details table

OK, so we're going to continue with the order details. And you've probably noticed kind of the flow of our pages where, let's say, the payment method, there's a page.tsx, which is server-side rendered. And it just has a couple of things in it, the session, the user. But then we have the payment method form embedded in it. And that is client-side, because that's where all of our hooks and all of the interaction goes. obviously the form output, the React hook form stuff. Same thing with the shipping address. So the page doesn't have a ton of stuff in it. We're just getting the cart session user. And then the shipping address form is the client side component that has all the hooks and the interaction. So I want to do the same thing with our order page or order ID. We have our page where we get the ID from the URL, and then we get the order. And then all the main stuff is going to go in the component that we're about to create. Now, it's not a form, so we're not going to call it like…

Contents