From fe8647bd1d16e5115d8119f4092c564cc3c40ed2 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 5 Nov 2023 08:59:16 -0300 Subject: [PATCH] fix(docs): router import added to the routing next.js app docs --- apps/docs/content/docs/guide/routing.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/docs/content/docs/guide/routing.mdx b/apps/docs/content/docs/guide/routing.mdx index fe404a1795..24b9b1ab10 100644 --- a/apps/docs/content/docs/guide/routing.mdx +++ b/apps/docs/content/docs/guide/routing.mdx @@ -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(); @@ -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();