"use client"; import Image from "next/image"; import Link from "next/link"; import { Menu, Phone, X } from "lucide-react"; import { usePathname } from "next/navigation"; import { useEffect, useState } from "react"; import { contact } from "@/data/site"; import { UserMenu } from "@/components/user-menu"; const nav = [ { href: "/", label: "صفحه اصلی" }, { href: "/products", label: "محصولات" }, { href: "/blog", label: "مقالات" }, { href: "/features", label: "ویژگی‌ها" }, { href: "/about", label: "درباره ما" }, { href: "/contact", label: "تماس با ما" }, ]; export function Header() { const pathname = usePathname(); const [open, setOpen] = useState(false); const [scrolled, setScrolled] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 30); onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); useEffect(() => setOpen(false), [pathname]); return (
گلسموند {contact.mobile}
); }