We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbc4ad3 commit c240a23Copy full SHA for c240a23
src/components/Search.tsx
@@ -4,7 +4,7 @@
4
5
import Head from 'next/head';
6
import Link from 'next/link';
7
-import Router from 'next/router';
+import {useRouter} from 'next/navigation';
8
import {lazy, useEffect} from 'react';
9
import * as React from 'react';
10
import {createPortal} from 'react-dom';
@@ -111,6 +111,7 @@ export function Search({
111
},
112
}: SearchProps) {
113
useDocSearchKeyboardEvents({isOpen, onOpen, onClose});
114
+ const router = useRouter();
115
return (
116
<>
117
<Head>
@@ -127,7 +128,7 @@ export function Search({
127
128
onClose={onClose}
129
navigator={{
130
navigate({itemUrl}: any) {
- Router.push(itemUrl);
131
+ router.push(itemUrl);
132
133
}}
134
transformItems={(items: any[]) => {
0 commit comments