Next.js Discord

Discord Forum

Parallel route modal

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
Hi i have a modal for which im using parallel routes. I display info after user clicks an element and i display it over the ui of corresponding page it was opened on.

Now i also want to be able to display it if someone refreshes the page, for that i added default.tsx to the same path in app directory just not in the parallel folder @ e.g:

app/@modal/modal/token/[token]
app/modal/token/[token]

but then if i want to open the modal over one of the other pages it will take the app/modal/token/[token] background

how can i make that modal display in parallel but have a fallback page in case its a refresh

1 Reply

Lilac
I'm also wondering the same