Next.js Discord

Discord Forum

Group router

Answered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
Group router not working
app/
├── (dash)/
├── dashborad/
│   ├── layout.js
│   └── page.js

24 Replies

American black bearOP
and keeping to get 404
your route groups should contain some route and please write your folders in small letters @American black bear
oh what
nvm
that because the first i tried was Dashborad not dashboard
my bad
working now?
American black bearOP
yeah but the layout still same
you have 2 route groups?
American black bearOP
i don't use the NavBar
@B33fb0n3 you have 2 route groups?
American black bearOP
I need the main to be group too?
if you want to have multiple main layouts you also need multiple route groups, yea. And in each route group, you need the specific main layout
Answer
@B33fb0n3 if you want to have multiple main layouts you also need multiple route groups, yea. And in each route group, you need the specific main layout
American black bearOP
so that should be look like this?
app/
layout.tsx
├── (dash)/
├── dashborad/
│   ├── layout.tsx
│   └── page.tsx
└── (Main)/Home
    ├── layout.tsx
    └── page.tsx
American black bearOP
ooo that working now yay
ty!
great to hear. Please mark solution