Nested dynamic routes /blogs/[slug]/*
Answered
Oak apple gall wasp posted this in #help-forum
Oak apple gall waspOP
How would I represent
current layout
But
leads to a 404 page with the following route:
/blogs/{slug}
/blogs/{slug}/categories/{slug}
/blogs/{slug}/tags/{slug}
/blogs/{slug}/posts/{slug}current layout
pages
├── _app.tsx
├── blogs
│ └── [blog_slug]
│ ├── categories
│ │ ├── [category_slug]
│ │ │ └── page.tsx
│ │ └── page.tsx
│ ├── page.tsx
│ ├── posts
│ │ ├── page.tsx
│ │ └── [post_slug]
│ │ └── page.tsx
│ └── tags
│ ├── page.tsx
│ └── [tag_slug]
│ └── page.tsx
└── index.tsxBut
<h1><Link href={{
pathname: '/blogs/[slug]',
query: {slug: data.slug},
}}>{data.title}</Link></h1>leads to a 404 page with the following route:
http://localhost:3000/blogs/zweiter-blogAnswered by Oak apple gall wasp
... they need to be called
index.tsx, not page.tsx as someone wrote in another question's thread about nested dynamic routes.1 Reply
Oak apple gall waspOP
... they need to be called
index.tsx, not page.tsx as someone wrote in another question's thread about nested dynamic routes.Answer