mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This PR fixes the bug in which interception routes of the form `(.)[param]` would not intercept navigations. The bug happened because we would not create a dynamic route matcher for the intercepted route, so we would never match the correct dynamic route when hitting the server, falling back to the base one. The fix consists of fixing the logic that checks for a dynamic route so that it checks the correct path when handling an interception route. There's probably a better fix here, advice welcome fixes #52533
30 lines
819 B
JavaScript
30 lines
819 B
JavaScript
import Link from 'next/link'
|
|
|
|
export default function Layout({ children, modal }) {
|
|
return (
|
|
<div>
|
|
<h1>intercepting-siblings</h1>
|
|
<div style={{ border: '1px solid black', padding: '1rem' }}>
|
|
{children}
|
|
</div>
|
|
<hr />
|
|
<div style={{ border: '1px solid black', padding: '1rem' }}>{modal}</div>
|
|
<h1>links</h1>
|
|
<ul>
|
|
<li>
|
|
<Link href="/intercepting-siblings">/intercepting-siblings</Link>
|
|
</li>
|
|
<li>
|
|
<Link href="/intercepting-siblings/1">/intercepting-siblings/1</Link>
|
|
</li>
|
|
<li>
|
|
<Link href="/intercepting-siblings/2">/intercepting-siblings/2</Link>
|
|
</li>
|
|
<li>
|
|
<Link href="/intercepting-siblings/3">/intercepting-siblings/3</Link>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
)
|
|
}
|