Hamkytech's picture
Upload pages/_app.js with huggingface_hub
14a0c7f verified
Raw History Blame Contribute Delete
646 Bytes
import '../styles/globals.css';
import { motion, AnimatePresence } from 'framer-motion';
import { useRouter } from 'next/router';
function MyApp({ Component, pageProps }) {
const router = useRouter();
return (
<AnimatePresence mode="wait">
<motion.div
key={router.route}
initial="initial"
animate="animate"
exit="exit"
variants={{
initial: { opacity: 0 },
animate: { opacity: 1 },
exit: { opacity: 0 },
transition={{ duration: 0.3 }}
>
<Component {...pageProps} />
</motion.div>
</AnimatePresence>
);
}
export default MyApp;