refactor: completely remove framer-motion and page transitions

This commit is contained in:
ralksta
2026-03-07 09:11:40 +01:00
parent 59ff506b72
commit a529614c19
4 changed files with 1 additions and 87 deletions

View File

@@ -1,39 +0,0 @@
'use client';
import { motion, AnimatePresence } from 'framer-motion';
import { usePathname } from 'next/navigation';
import React from 'react';
interface PageTransitionProps {
children: React.ReactNode;
enabled: boolean;
}
/**
* Provides smooth page transitions using framer-motion.
* Can be toggled on/off via gallery.yaml.
*/
export function PageTransition({ children, enabled }: PageTransitionProps) {
const pathname = usePathname();
if (!enabled) {
return <>{children}</>;
}
return (
<AnimatePresence mode="wait">
<motion.div
key={pathname}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{
duration: 0.3,
ease: 'easeInOut',
}}
>
{children}
</motion.div>
</AnimatePresence>
);
}