Skip to content

Commit

Permalink
chore: fix nextjs link guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Feb 23, 2024
1 parent ecb8d96 commit 893b24b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function RootLayout({

### Link Component

Configure a `linkComponent` to make the Saas UI components that use `Link` work with the Next.js router.
Configure a `linkComponent` to make the Saas UI components use `Link` that works with the Next.js router.

```tsx
'use client'
Expand All @@ -78,7 +78,7 @@ const NextLink = React.forwardRef<HTMLAnchorElement, LinkProps>(
)

export function Providers({ children }: { children: React.ReactNode }) {
return <SaasProvider linkComponent={Link}>{children}</SaasProvider>
return <SaasProvider linkComponent={NextLink}>{children}</SaasProvider>
}
```

Expand Down

0 comments on commit 893b24b

Please sign in to comment.