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.

Admin layout and menu

Admin layout and menu

All right, guys, so we have a few things to do here. We're going to start to work on the admin section. And the admin section is going to look like this at the top where it has the bar and then the items like users, products, orders. And obviously, we can click on that. We'll see them in a table. We'll be able to delete them, edit them, et cetera. And then we'll also have a search box here to filter out those resources as well. So we're going to create a new admin folder. And that will pertain to slash admin slash whatever pages we put in there. And it'll also have a layout and a main nav like this, which is going to be very similar to the user stuff. So we can actually just copy the user layout and main nav and then just edit it where we need to. Now, we also want to add an admin option over here, but it should only be for admin users. Regular users shouldn't be able to see it. So let's start off by going into app. And we're going to create a folder in app called admin. And then what…

Contents