"use client"; import { useState, useEffect } from "react"; import Link from "next/link"; import DynamicLogo from "./DynamicLogo"; import { motion, AnimatePresence } from "framer-motion"; import { Menu, X } from "lucide-react"; const NAV_LINKS = [ { label: "Ana Sayfa", href: "/" }, { label: "Çalışmalar", href: "/works" }, { label: "Hizmetler", href: "/services" }, { label: "Partnerler", href: "/partners" }, { label: "Hakkımızda", href: "/about" }, { label: "İletişim", href: "/contact" }, ]; export default function Navbar() { const [isOpen, setIsOpen] = useState(false); // Body scroll lock useEffect(() => { if (isOpen) { document.body.style.overflow = "hidden"; } else { document.body.style.overflow = "unset"; } return () => { document.body.style.overflow = "unset"; }; }, [isOpen]); return ( <>
{/* Logo */} setIsOpen(false)} > {/* Center Nav - Desktop */}
{NAV_LINKS.map((item, idx) => (
{/* Diagonal separator */}
{item.label}
))}
{/* Right - Mobile Toggle & Brand */}
{/* Mobile Menu Overlay */} {isOpen && (
{NAV_LINKS.map((item, idx) => ( setIsOpen(false)} className="text-4xl md:text-6xl font-bold tracking-tighter text-black/90 hover:text-black transition-all hover:pl-4" style={{ fontFamily: "var(--font-martian)" }} > {item.label} ))}
)}
); }