diff options
| author | Rafi Zadanly <rafizadanly@gmail.com> | 2022-11-20 01:08:57 +0700 |
|---|---|---|
| committer | Rafi Zadanly <rafizadanly@gmail.com> | 2022-11-20 01:08:57 +0700 |
| commit | 6df02d6a2bf6d5ea77f7703917f2709562308a1a (patch) | |
| tree | 4695dcefecead7d66ebec74b938e0987328ce1cd /src/pages/_app.js | |
| parent | ce16ffadc9c0db5a31665d30aff2b6eeaa8e7834 (diff) | |
Improve page transition and product card badge
Diffstat (limited to 'src/pages/_app.js')
| -rw-r--r-- | src/pages/_app.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/pages/_app.js b/src/pages/_app.js index faa8b2b4..a7a8e86e 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -3,8 +3,6 @@ import NextProgress from 'next-progress'; import { ToastContainer, Slide } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import { useRouter } from 'next/router'; -import { useEffect, useState } from 'react'; -import Image from 'next/image'; import { AnimatePresence } from 'framer-motion'; function MyApp({ Component, pageProps }) { @@ -20,14 +18,9 @@ function MyApp({ Component, pageProps }) { transition={Slide} limit={1} /> - <NextProgress color="#D7A30A" options={{ - showSpinner: false, - }} /> - <AnimatePresence - mode='sync' - initial={false} - > - <Component {...pageProps} /> + <NextProgress color="#D7A30A" options={{ showSpinner: false }} /> + <AnimatePresence mode='wait' initial={false}> + <Component {...pageProps} key={router.asPath} /> </AnimatePresence> </> ) |
