'use client' import Link from 'next/link' import { usePathname } from 'next/navigation' import { Logo } from '@/components/logo' import { Menu, X } from 'lucide-react' import { Button } from '@/components/ui/button' import React from 'react' import { cn } from '@/lib/utils' import { type } from '@/lib/typography' import { ThemeToggle } from '@/components/theme-toggle' const menuItems = [ { name: 'صفحه اصلی', href: '/' }, { name: 'دانشنامه', href: '/blog' }, { name: 'راه حل‌ها', href: '/solutions' }, { name: 'مشاوره سازمانی', href: '/consulting' }, // { name: 'قیمت‌گذاری', href: '/pricing' }, // { name: 'آزمایشگاه فیپ', href: '/playground' }, { name: 'درباره ما', href: '/about' }, ] /** Outer gutter — matches hero image wrapper (`px-6 md:px-2`). */ const siteGutterClass = 'px-6 md:px-2 lg:px-6' /** Bar width — matches hero image inner container (`max-w-5xl md:max-w-4xl`). */ const headerBarClass = 'mx-auto w-full max-w-5xl md:max-w-4xl lg:max-w-6xl' function isLinkActive(pathname: string, href: string): boolean { if (href === '/') return pathname === '/' return pathname === href || pathname.startsWith(href + '/') } export const HeroHeader = () => { const pathname = usePathname() const [menuState, setMenuState] = React.useState(false) const [isScrolled, setIsScrolled] = React.useState(false) React.useEffect(() => { const handleScroll = () => { setIsScrolled(window.scrollY > 50) } window.addEventListener('scroll', handleScroll) return () => window.removeEventListener('scroll', handleScroll) }, []) React.useEffect(() => { document.body.style.overflow = menuState ? 'hidden' : '' return () => { document.body.style.overflow = '' } }, [menuState]) return (
) }