"use client" import React, { useEffect, useState } from "react" import { motion, AnimatePresence, cubicBezier } from "framer-motion" import { useLocation } from "react-router-dom" interface PageTransitionProps { children: React.ReactNode } const customEase = cubicBezier(0.25, 0.1, 0.25, 1) const Logo = () => ( Logo ) const PageTransition = ({ children }: PageTransitionProps) => { const location = useLocation() const [isAnimating, setIsAnimating] = useState(false) const [showContent, setShowContent] = useState(true) useEffect(() => { setIsAnimating(true) setShowContent(false) const contentTimer = setTimeout(() => { setShowContent(true) }, 800) const animationTimer = setTimeout(() => { setIsAnimating(false) }, 1000) return () => { clearTimeout(contentTimer) clearTimeout(animationTimer) } }, [location.pathname]) return (
{/* Overlay mit Logo */} {isAnimating && ( )} {/* Content */} {showContent && ( {children} )}
) } export default PageTransition