'use client' import { motion } from 'framer-motion' import { useState, useEffect } from 'react' import { Link, usePathname } from '@/i18n/routing' import { useTranslations } from 'next-intl' import LocaleSwitcher from './LocaleSwitcher' import { cn } from '@/lib/utils' import { Menu, X } from 'lucide-react' export default function Header() { const [scrolled, setScrolled] = useState(false) const [mobileMenuOpen, setMobileMenuOpen] = useState(false) const t = useTranslations('nav') const pathname = usePathname() const isHome = pathname === '/' // If we are not on the home page, the header should always look "scrolled" // so the text is visible against the light background. const isScrolledOrInner = scrolled || !isHome useEffect(() => { const handler = () => setScrolled(window.scrollY > 50) window.addEventListener('scroll', handler, { passive: true }) // Initialize handler() return () => window.removeEventListener('scroll', handler) }, []) return (
{/* Logo */} Sitar Apart {/* Desktop Navigation */} {/* Desktop Actions */}
{t('book_now')}
{/* Mobile Menu Button */}
{/* Mobile Menu */} {mobileMenuOpen && (
)}
) }