File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1616    " url-state"  ,
1717    " search"  ,
1818    " params"  ,
19-     " query" 
19+     " query"  ,
20+     " front-end" 
2021  ],
2122  "description" : " React hook for managing state in the URL"  ,
2223  "dependencies" : {},
Original file line number Diff line number Diff line change @@ -33,11 +33,13 @@ export class GenericRouter implements UrlStateRouter {
3333  push ( href : string ) : void   { 
3434    // Use Next.js router if available 
3535    // 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+     // } 
4143    this . onSearchParamsChange ( ) ; 
4244  } 
4345
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments