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'
To accept `href` in a custom component wrapping `next/link`, use a generic:
```tsx
import type { Route } from 'next';
import Link from 'next/link';
import type { Route } from 'next'
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 (
<Link href={href}>
<div>My Card</div>
</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