"use client"; import { AnimatePresence, m } 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"; import { useTranslations } from "next-intl"; const Layout = ({ children }: { children: React.ReactNode }) => { const t = useTranslations("Layout"); 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 || pathname === `/en${path}` || pathname === `/de${path}`; const navLinks = [ { href: "/", label: t("nav.home"), icon: Home }, { href: "/ueber-uns", label: t("nav.about"), icon: Info }, ]; return (
Website developed by{" "} mintel.me