NextJs 14. Intercepting Routes. Modal. Routing Problem

27 Views Asked by At

Is it possible to navigate from OrderPage (/orders/n) to (/payments/n) using NextJs Link without activating @modal from parent directory (/orders)?

I recreated the problem in codesandbox

Order listing page (/orders) has list of orders and corresponding payments. If you open either links, modal is opened that is in fact expected behavior. But if you open /orders/n page directly one can expect to navigate to /payments/n page instead of /payments/n modal after clicking on the /payments/n link. Is it default behavior or am I missing something?

What I want: In page /orders/1 -> go to /payments/1 [Open in it as normal page];

What is happening: In page /orders/1 -> go to /payments/1 [Is opening as @modal];

0

There are 0 best solutions below