Is there a working around to closing a modal with a catchAll route?
Unanswered
Short-eared Owl posted this in #help-forum
Short-eared OwlOP
I'm following these instructions:
https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#dismissing-a-modal, which they explain that in order to make a "modal" (intercepted route) close when navigating away from it via a link inside the modal, for example, you should add this
Is there any sort of workaround? I basically have a login page, which gets intercepted as a modal and in that modal, there is a link to the privacy policy. I want the model to close/navigate away after closing, or changing routes.
https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#dismissing-a-modal, which they explain that in order to make a "modal" (intercepted route) close when navigating away from it via a link inside the modal, for example, you should add this
[,,,catchAll] + page.tsx, returning null in order to make the model/intercepted route close. However, next to my @auth folder, I have a real [...segments]. I get a build error saying the following if I try to build:#14 1.945 > Build error occurred
#14 1.947 Error: You cannot use different slug names for the same dynamic path ('catchAll' !== 'segments').
#14 1.947 at handleSlug (/app/node_modules/.pnpm/next@15.0.0-canary.58_react-dom@19.0.0-rc-58af67a8f8-20240628_react@19.0.0-rc-58af67a8f8-20240628/node_modules/next/dist/shared/lib/router/utils/sorted-routIs there any sort of workaround? I basically have a login page, which gets intercepted as a modal and in that modal, there is a link to the privacy policy. I want the model to close/navigate away after closing, or changing routes.