Unverified Commit d167ecce authored by Oskar Oldorf's avatar Oskar Oldorf Committed by GitHub

Documentation: Update link-no-children error page for new link (#46514)

The example still has an `<a>` inside the `<Link>` which was deprecated
with next 13.

Current page: https://nextjs.org/docs/messages/link-no-children

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->


## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

---------
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
Co-authored-by: 's avatarTim Neutkens <tim@timneutkens.nl>
parent 494943cb
...@@ -11,9 +11,11 @@ import Link from 'next/link' ...@@ -11,9 +11,11 @@ import Link from 'next/link'
export default function Home() { export default function Home() {
return ( return (
<Link href="/about"></Link> <>
// or <Link href="/about" legacyBehavior></Link>
<Link href='/about' /> // or
<Link href="/about" legacyBehavior />
</>
) )
} }
``` ```
...@@ -27,9 +29,13 @@ import Link from 'next/link' ...@@ -27,9 +29,13 @@ import Link from 'next/link'
export default function Home() { export default function Home() {
return ( return (
<Link href="/about"> <>
<a>To About</a> <Link href="/about">To About</Link>
</Link> // or
<Link href="/about" legacyBehavior>
<a>To About</a>
</Link>
</>
) )
} }
``` ```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment