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.
Payment method page - Next.js Tutorial
From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch
Payment method page
In the last video, we created the action in the schema for the payment method. Now we want to create the page in the form. And I'll try to squeeze it into this video, but we might have to separate it into two because the form has quite a bit. We're going to be using React hook form again. So in the app root, we want to create a new folder here and we want to call this payment dash method. And then in that, we want to create new file called page.tsx and let's call this payment method page and let's see what right now we'll just bring in actually let's just get it displaying first so we'll just say payment method and then that should show here there we There we go. All right, now I'm just going to bring in a couple of things here. So I want to have the title and the tab. So we're going to import the metadata type from Next. And then let's import Auth because we're going to want to get the session and the user. That's going to be from at slash Auth. And then let's also bring in the get…
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)
-
-
-
-
-
-
-
-
-
-