Next.js Discord

Discord Forum

Struggling to define parallel routes

Unanswered
del posted this in #help-forum
Open in Discord
delOP
I'm struggling to define the following route structure using app router parallel routes:
main:
/hub/settings
/hub/projects
/project

sidebar:
/hub/* (i need to catch /hub/settings and /hub/projects here)
/project

I've tried the following folder structure, but can't get sidebar to work as expected:
(inside my root layout I use routes from props as sidebar and main)

@main/hub/projects/page.tsx
@main/hub/settings/page.tsx
@main/project/page.tsx

(nothing works)
- @sidebar/hub/[any_page]/page.tsx
- @sidebar/hub/default.tsx
- @sidebar/hub/page.tsx
- @sidebar/hub/not-found.tsx
- @sidebar/hub/[...]/page.tsx
- @sidebar/hub/[page].tsx

1 Reply