#[Error: catch all segment must be the last segment] – setting up a catch all route with @modal.

2 messages · Page 1 of 1 (latest)

spring fractal
#

Hey, it's breaking my head but i'd expect this to be possible.

Error: [Error: Invalid segment Dynamic("slug"), catch all segment must be the last segment (segments: [Group("pages"), Group("public"), Static("browse"), OptionalCatchAll("slug")])

**What I'm trying to achieve: **
To have static route browse, when someone filters then they do it on dynamic route browse/filter, both routes have modal available. Is such set up possible? Thanks!

**My project's folder structure: **

app
├── (pages)
│   ├── (public)
│   │   ├── browse
│   │   │   ├── [[...slug]]
│   │   │   │   ├── @modal
│   │   │   │   │   ├── [slug]
│   │   │   │   │   │   ├── modal.tsx
│   │   │   │   │   │   └── page.tsx
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── default.tsx
│   │   │   │   └── page.tsx
forest cragBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)