Skip to content

Commit

Permalink
fix(docs): router import added to the routing next.js app docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgarciadev committed Nov 5, 2023
1 parent 2399257 commit fe8647b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/docs/content/docs/guide/routing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Go to your `app/providers.tsx` or `app/providers.jsx` (create it if it doesn't e
'use client'

import {NextUIProvider} from '@nextui-org/react';
import {useRouter} from 'next/navigation'

export function Providers({children}: { children: React.ReactNode }) {
const router = useRouter();
Expand Down Expand Up @@ -105,8 +106,8 @@ from `next/router`, it returns a router object that can be used to perform navig
```tsx
// pages/_app.tsx
import type { AppProps } from 'next/app';
import {useRouter} from 'next/router';
import {NextUIProvider} from '@nextui-org/react';
import {useRouter} from 'next/router';

function MyApp({ Component, pageProps }: AppProps) {
const router = useRouter();
Expand Down

2 comments on commit fe8647b

@vercel
Copy link

@vercel vercel bot commented on fe8647b Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on fe8647b Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.