diff options
| author | Rafi Zadanly <rafizadanly@gmail.com> | 2022-11-20 10:38:34 +0700 |
|---|---|---|
| committer | Rafi Zadanly <rafizadanly@gmail.com> | 2022-11-20 10:38:34 +0700 |
| commit | 56aa38c591272d5cdfe9fc65aa3581539393e966 (patch) | |
| tree | c50e346d732b4e90290567d0bf8ade56cb7a213e /src/pages/_app.js | |
| parent | 6df02d6a2bf6d5ea77f7703917f2709562308a1a (diff) | |
Scroll false when change page
Diffstat (limited to 'src/pages/_app.js')
| -rw-r--r-- | src/pages/_app.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pages/_app.js b/src/pages/_app.js index a7a8e86e..23172bfd 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -19,7 +19,11 @@ function MyApp({ Component, pageProps }) { limit={1} /> <NextProgress color="#D7A30A" options={{ showSpinner: false }} /> - <AnimatePresence mode='wait' initial={false}> + <AnimatePresence + mode='wait' + initial={false} + onExitComplete={() => window.scrollTo(0, 0)} + > <Component {...pageProps} key={router.asPath} /> </AnimatePresence> </> |
