Spaces:
Running
Running
Simeon Garratt
feat: polish — page transitions, sound integration, screen shake, remaining files
6229f9b | "use client"; | |
| import { motion } from "framer-motion"; | |
| /** | |
| * Page transition wrapper that applies a subtle fade + slide | |
| * animation when the component mounts or unmounts. | |
| * Wrap the outermost content of each route page with this component. | |
| */ | |
| interface PageTransitionProps { | |
| children: React.ReactNode; | |
| } | |
| export function PageTransition({ children }: PageTransitionProps) { | |
| return ( | |
| <motion.div | |
| initial={{ opacity: 0, y: 8 }} | |
| animate={{ opacity: 1, y: 0 }} | |
| exit={{ opacity: 0, y: -8 }} | |
| transition={{ duration: 0.2, ease: "easeOut" }} | |
| > | |
| {children} | |
| </motion.div> | |
| ); | |
| } | |