Next.js Discord

Discord Forum

How to create a route that renders when accessing both root `/` and `/[slugId]`?

Unanswered
Schneider’s Smooth-fronted Caima… posted this in #help-forum
Open in Discord
Original message was deleted.

1 Reply

Original message was deleted
i think you need an optional catch-all /[[...slugId]] here and use custom logic inside your page to listen to slugId change to render index.tsx and/or the modal accordingly