You have tried to use a dynamic href
with next/link
in the app
directory. This is not supported as the new client-side router no longer uses a mapping of dynamic routes -> url, instead it always leverages the url.
Before
<Link
href={{
pathname: '/route/[slug]',
query: { slug: '1' },
}}
>
link
</Link>
Or
<Link href="/route/[slug]?slug=1">link</Link>
After
<Link href="/route/1">link</Link>