Specific route for a modal on top of a existing page (parallel routes / direct visit / reload issue)
Unanswered
Wendell Misiedjan posted this in #help-forum
Hi all,
We're attempting to use parallel routes / slots to show a modal / sheet when a specific route is visited. We have this page
Is this use case even possible at all with the next.js router or should we switch to e.g. a searchParams approach instead?
We're attempting to use parallel routes / slots to show a modal / sheet when a specific route is visited. We have this page
/products/:productId/faqs/:faqType/:faqId, what we want to happen when this url is visited is that a modal is opened on top of the product page, the state of the product page should be preserved (we tried catch-all but that will reset the state). The modal is in this case for the faqType and has it's own navigation menu to the specific faqIds. Soft navigating seems to work but hard reloads / direct visits don't. We've added default.js/tsx files to these segments too at multiple levels but it keeps hitting a 404 page on direct visits.Is this use case even possible at all with the next.js router or should we switch to e.g. a searchParams approach instead?