'use client' import { Link, usePathname, useRouter } from '@/i18n/routing' import { useTranslations, useLocale } from 'next-intl' import { useState } from 'react' export function Header() { const t = useTranslations('nav') const locale = useLocale() const pathname = usePathname() const router = useRouter() const [isOpen, setIsOpen] = useState(false) const toggleLanguage = () => { const nextLang = locale === 'tr' ? 'en' : 'tr' router.replace(pathname, { locale: nextLang }) } return (
{/* Mobile Menu */} {isOpen && (
setIsOpen(false)} className="font-label-caps text-label-caps text-on-surface hover:text-secondary py-2 uppercase">{t('home')} setIsOpen(false)} className="font-label-caps text-label-caps text-on-surface hover:text-secondary py-2 uppercase">{t('menu')} setIsOpen(false)} className="font-label-caps text-label-caps text-on-surface hover:text-secondary py-2 uppercase">{t('gallery')} setIsOpen(false)} className="bg-secondary-container text-on-secondary-container px-6 py-2 font-label-caps text-label-caps uppercase tracking-widest text-center mt-2">{t('reservation')}
)}
) }