'use client'; import { AnimatePresence, m, LazyMotion, domAnimation } from 'framer-motion'; import { ArrowUp, Home, Info, Menu, X } from 'lucide-react'; import Image from 'next/image'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import React, { useEffect, useState } from 'react'; import { Button } from './Button'; import { Reveal } from './Reveal'; const Layout = ({ children }: { children: React.ReactNode }) => { const pathname = usePathname(); const [showScrollTop, setShowScrollTop] = useState(false); const [isScrolled, setIsScrolled] = useState(false); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); useEffect(() => { const handleScroll = () => { setShowScrollTop(window.scrollY > 400); setIsScrolled(window.scrollY > 20); }; window.addEventListener('scroll', handleScroll, { passive: true }); return () => window.removeEventListener('scroll', handleScroll); }, []); useEffect(() => { setIsMobileMenuOpen(false); }, [pathname]); const scrollToTop = () => { window.scrollTo({ top: 0, behavior: 'smooth' }); }; const isActive = (path: string) => pathname === path; const navLinks = [ { href: '/', label: 'Startseite', icon: Home }, { href: '/ueber-uns', label: 'Über uns', icon: Info }, ]; return (
Website developed by mintel.me