Next.js Discord

Discord Forum

Next.js App routing with modals (2 different routes)

Unanswered
Swamp Sparrow posted this in #help-forum
Open in Discord
Swamp SparrowOP
Hi I am transitioning an app from react-router-dom to nextjs app router and ran into some confusion on how to implement something. I have a modal that can popover an underlying route and have the previous route displayed behind the modal. In effect page is /dashboard/inbox/ then popping over forum/[id]/discussion/[discId] in the modal. I understand the basic structure without parrallel routes and intercepting routes would look something like this.
 
dashboard
-- inbox
      Page.tsx
forum/
-- [id]
-- -- discussion
-- -- -- [discId]
            page.tsx
 

How do I allow a "previous" route to render under a modal?

0 Replies