vercel / next.js

The React Framework
https://nextjs.org
MIT License
124.89k stars 26.67k forks source link

[Parallel and Intercepted Dynamic Routes] Will intercept normal routing #65492

Open lmy1991 opened 4 months ago

lmy1991 commented 4 months ago

Link to the code that reproduces this issue

https://github.com/lmy1991/nextgram

To Reproduce

1.Click on the search block 2.Search route intercepted

Current vs. Expected behavior

1.Click on the search block 2.The search route will not be intercepted and will redirect normally to the search details page

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 32495
  Available CPU cores: 16
Binaries:
  Node: 18.17.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.3.0-canary.22 // There is a newer canary version (14.3.0-canary.45) available, please upgrade!
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.5
Next.js Config:
  output: N/A
 ⚠ There is a newer canary version (14.3.0-canary.45) available, please upgrade!
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) are affected? (Select all that apply)

Parallel & Intercepting Routes

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

clearly-outsane commented 3 months ago

I'm having this issue. Paralle routes with intercepts for dynamic routes intercepts everything in that route even though it should be redirect to another place. For example:

test
--[id]
----page.tsx
--@parallel
----(.)[id]
------page.tsx
--other
----page.tsx

with the above folder structure ^ . When you're on /test and navigate to /test/other it intercepts it even though it should only intercept /test/[id] routes

That's a pretty huge bug in my opinion and I hope someone will look at this urgently

shehi commented 3 months ago

Same here: When a Link is clicked to open intercepted modal, for a brief moment normal route is shown, before switching to intercepted one (the modal). In below screencapture, you can see normal route appearing at the bottom (with "Loading" text), when I click "Import" button.

Screencast from 22.05.2024 01:40:54.webm