next-restore-scroll-position
Advanced tools
Comparing version
interface Router { | ||
asPath: string; | ||
events: { | ||
on: (event: string, callback: (data: any) => void) => void; | ||
off: (event: string, callback: (data: any) => void) => void; | ||
on: (event: string | 'routeChangeStart' | 'routeChangeComplete', callback: (data: any) => void) => void; | ||
off: (event: string | 'routeChangeStart' | 'routeChangeComplete', callback: (data: any) => void) => void; | ||
}; | ||
@@ -7,0 +7,0 @@ beforePopState: (callback: () => boolean) => void; |
{ | ||
"name": "next-restore-scroll-position", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Restores scroll position when navigating back and forth in NextJS", | ||
"main": "index.js", | ||
"main": "dist/index.cjs", | ||
"url": "https://github.com/MichalSzorad/next-restore-scroll-position", | ||
@@ -7,0 +7,0 @@ "scripts": { |
@@ -7,4 +7,4 @@ import { useEffect, useRef } from 'react' | ||
events: { | ||
on: (event: string, callback: (data: any) => void) => void | ||
off: (event: string, callback: (data: any) => void) => void | ||
on: (event: string | 'routeChangeStart' | 'routeChangeComplete', callback: (data: any) => void) => void | ||
off: (event: string | 'routeChangeStart' | 'routeChangeComplete', callback: (data: any) => void) => void | ||
} | ||
@@ -11,0 +11,0 @@ beforePopState: (callback: () => boolean) => void |
Sorry, the diff of this file is not supported yet
12571
2.24%