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.

Auth layout and sign-in page

Auth layout and sign-in page

So now we're going to start to work on the sign-in page, but I want to have a separate layout for both the sign-in and the sign-up pages, because they're going to have a narrow box in the middle. So what we'll do is create a new group. So in the app folder, in addition to root, we're going to have a folder with parentheses called auth. Now, this auth doesn't get added to the route. This doesn't mean slash auth. That's not what that means, because it has parentheses. So it's not treated as part of the route. It's just a group and a way to organize things. And in that auth, we're going to create a new layout.tsx file. And in that, let's just copy from the root layout. So I'll just grab all this stuff here. And let's paste that in the auth layout. And we can change the name of this as well. So instead of root, we can call this off layout. And it's going to take in children. We're not going to have the header. We're not going to have the footer. And then what I do want to have is just a…

Contents