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 - Next.js Tutorial
From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch
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…
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)
Section intro1m 31s
-
(Locked)
Payment method and Zod schemas9m 27s
-
(Locked)
Payment method page8m 1s
-
(Locked)
Payment method form and update13m 9s
-
(Locked)
Order and OrderItem Prisma models11m 7s
-
(Locked)
Order Zod schemas and types8m 16s
-
(Locked)
Place order page18m 5s
-
(Locked)
Create order action14m 15s
-
(Locked)
Place order form7m 37s
-
(Locked)
Order page and action8m 27s
-
(Locked)
Format utility functions8m 20s
-
(Locked)
Order details table14m 5s
-
(Locked)
-
-
-
-
-
-
-
-
-
-