From the course: Master Next.js by Building Scalable Apps with Routing, Databases, and Performance

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Creating users page

Creating users page

Now, let's start creating the users route and page. First I'll create a folder named users in the with layout folder group. So let me do that. Alright, now the route is created. Let's define the page JSX inside it and we'll create the component inside the page JSX file. So I will say export default function users. Now inside the return I will say division and here just an h1. This is the users page. Let's save and check and there we have the users page ready. Now these pages are going to have just a table to display the existing records and a button to add new records. So let's create the title and button along with the table. First of all, I'll have the page title and the button to add more users. So I will define a div and write the h1 for title, class name, font semi bold, text to To excel p2, we'll say user management. And inside the button, I'll say add users. Now let's check the output after saving. All right, now here we need to align the button to the right and also need to…

Contents