Skip to content

Commit 0d1b11f

Browse files
zhuyedevsamcx
andauthored
docs: Remove superfluous <PagesOnly> tags in api-reference/components/link.mdx (#62501)
Within the document [docs/02-app/02-api-reference/01-components/link.mdx](https://github.com/zhuyedev/next.js/blob/canary/docs/02-app/02-api-reference/01-components/link.mdx#L327), there is an unnecessary set of `<PagesOnly>` tags, which prevents a few sections from being displayed correctly.This issue particularly affects the section starting with "### If the child is a custom component that wraps an <a> tag" (in line 327) and ending just before "### Middleware" (in line 458). Co-authored-by: Sam Ko <[email protected]>
1 parent e60cb36 commit 0d1b11f

File tree

1 file changed

+0
-4
lines changed
  • docs/02-app/02-api-reference/01-components

1 file changed

+0
-4
lines changed

docs/02-app/02-api-reference/01-components/link.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,6 @@ function Page({ posts }) {
324324

325325
</AppOnly>
326326

327-
<PagesOnly>
328-
329327
### If the child is a custom component that wraps an `<a>` tag
330328

331329
<AppOnly>
@@ -455,8 +453,6 @@ The default behavior of `Link` is to scroll to the top of the page. When there i
455453
</Link>
456454
```
457455

458-
</PagesOnly>
459-
460456
### Middleware
461457

462458
It's common to use [Middleware](/docs/app/building-your-application/routing/middleware) for authentication or other purposes that involve rewriting the user to a different page. In order for the `<Link />` component to properly prefetch links with rewrites via Middleware, you need to tell Next.js both the URL to display and the URL to prefetch. This is required to avoid un-necessary fetches to middleware to know the correct route to prefetch.

0 commit comments

Comments
 (0)