File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 16
16
" url-state" ,
17
17
" search" ,
18
18
" params" ,
19
- " query"
19
+ " query" ,
20
+ " front-end"
20
21
],
21
22
"description" : " React hook for managing state in the URL" ,
22
23
"dependencies" : {},
Original file line number Diff line number Diff line change @@ -33,11 +33,13 @@ export class GenericRouter implements UrlStateRouter {
33
33
push ( href : string ) : void {
34
34
// Use Next.js router if available
35
35
// Next.js exposes a global object `window.next.router` with a `push` method for both /pages and /app routes
36
- if ( typeof window . next ?. router ?. push === 'function' ) {
37
- window . next . router . push ( href ) ;
38
- } else {
39
- window . history . pushState ( { } , '' , href ) ;
40
- }
36
+ // if (typeof window.next?.router?.push === 'function') {
37
+ // console.log('Next.js router is available');
38
+ // window.next.router.push(href);
39
+ // } else {
40
+ // console.log('Next.js router is NOT available');
41
+ window . history . pushState ( { } , '' , href ) ;
42
+ // }
41
43
this . onSearchParamsChange ( ) ;
42
44
}
43
45
You can’t perform that action at this time.
0 commit comments