Hamkytech commited on
Commit
14a0c7f
·
verified ·
1 Parent(s): 1a6b64d

Upload pages/_app.js with huggingface_hub

Browse files
Files changed (1) hide show
  1. pages/_app.js +28 -0
pages/_app.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import '../styles/globals.css';
2
+ import { motion, AnimatePresence } from 'framer-motion';
3
+ import { useRouter } from 'next/router';
4
+
5
+ function MyApp({ Component, pageProps }) {
6
+ const router = useRouter();
7
+
8
+ return (
9
+ <AnimatePresence mode="wait">
10
+ <motion.div
11
+ key={router.route}
12
+ initial="initial"
13
+ animate="animate"
14
+ exit="exit"
15
+ variants={{
16
+ initial: { opacity: 0 },
17
+ animate: { opacity: 1 },
18
+ exit: { opacity: 0 },
19
+
20
+ transition={{ duration: 0.3 }}
21
+ >
22
+ <Component {...pageProps} />
23
+ </motion.div>
24
+ </AnimatePresence>
25
+ );
26
+ }
27
+
28
+ export default MyApp;