diff options
Diffstat (limited to 'pages/_app.js')
| -rw-r--r-- | pages/_app.js | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/pages/_app.js b/pages/_app.js index 6334bd9..0030e0d 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -1,4 +1,3 @@ -// import { ThemeProvider } from "next-themes"; import { useRouter } from "next/router"; import { AnimatePresence, motion as m } from "framer-motion"; import NextNProgress from "nextjs-progressbar"; @@ -6,6 +5,7 @@ import { SessionProvider } from "next-auth/react"; import "../styles/globals.css"; import "react-toastify/dist/ReactToastify.css"; import "react-loading-skeleton/dist/skeleton.css"; +import { SkeletonTheme } from "react-loading-skeleton"; export default function App({ Component, @@ -15,36 +15,36 @@ export default function App({ return ( <SessionProvider session={session}> - {/* <ThemeProvider attribute="class"> */} <AnimatePresence mode="wait"> - <m.div - key={`route-${router.route}`} - transition={{ duration: 0.5 }} - initial="initialState" - animate="animateState" - exit="exitState" - variants={{ - initialState: { - opacity: 0, - }, - animateState: { - opacity: 1, - }, - exitState: {}, - }} - className="z-50 w-screen" - > - <NextNProgress - color="#FF7E2C" - startPosition={0.3} - stopDelayMs={200} - height={3} - showOnShallow={true} - /> - <Component {...pageProps} /> - </m.div> + <SkeletonTheme baseColor="#232329" highlightColor="#2a2a32"> + <m.div + key={`route-${router.route}`} + transition={{ duration: 0.5 }} + initial="initialState" + animate="animateState" + exit="exitState" + variants={{ + initialState: { + opacity: 0, + }, + animateState: { + opacity: 1, + }, + exitState: {}, + }} + className="z-50 w-screen" + > + <NextNProgress + color="#FF7E2C" + startPosition={0.3} + stopDelayMs={200} + height={3} + showOnShallow={true} + /> + <Component {...pageProps} /> + </m.div> + </SkeletonTheme> </AnimatePresence> - {/* </ThemeProvider> */} </SessionProvider> ); } |