Unverified Commit 8e1fa7ea authored by nauvalazhar's avatar nauvalazhar Committed by GitHub

docs: add a missing open brackets in a next/link custom component (#52178)

parent 941757ff
...@@ -118,15 +118,15 @@ import Link from 'next/link' ...@@ -118,15 +118,15 @@ import Link from 'next/link'
To accept `href` in a custom component wrapping `next/link`, use a generic: To accept `href` in a custom component wrapping `next/link`, use a generic:
```tsx ```tsx
import type { Route } from 'next'; import type { Route } from 'next'
import Link from 'next/link'; import Link from 'next/link'
function Card<T extends string>({ href }: { href: Route<T> | URL }) function Card<T extends string>({ href }: { href: Route<T> | URL }) {
return ( return (
<Link href={href}> <Link href={href}>
<div>My Card</div> <div>My Card</div>
</Link> </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