'use client'; import { motion, AnimatePresence } from 'framer-motion'; import { usePathname } from 'next/navigation'; import React from 'react'; const PageTransitionEffect = ({ children }: { children: React.ReactNode }) => { const pathname = usePathname(); const variants = { hidden: { opacity: 0, x: 0, y: 20 }, enter: { opacity: 1, x: 0, y: 0 }, exit: { opacity: 0, x: 0, y: -20 }, }; return ( window.scrollTo(0, 0)} > {children} ); }; export default PageTransitionEffect;