'use client'; // Fixed navigation with language, theme, account, and cart controls. import {useState, useEffect} from 'react'; import Image from 'next/image'; import {Badge, Button} from 'antd'; import {ShoppingCartOutlined, MenuOutlined, CloseOutlined, UserOutlined} from '@ant-design/icons'; import {useAppSelector, useAppDispatch} from '@/store/hooks'; import {selectCartCount, openDrawer} from '@/store/cartSlice'; import {useLanguage} from '@/app/context/LanguageContext'; import ThemeToggle from './ThemeToggle'; import LanguageToggle from './LanguageToggle'; export default function Header() { const dispatch = useAppDispatch(); const cartCount = useAppSelector(selectCartCount); const {t} = useLanguage(); const [scrolled, setScrolled] = useState(false); const [mobileOpen, setMobileOpen] = useState(false); const navLinks = [ {href: '#hero', label: t.nav.home}, {href: '#showcase', label: t.nav.showcase}, {href: '#about', label: t.nav.about}, {href: '#locations', label: t.nav.locations}, ]; useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 24); window.addEventListener('scroll', onScroll); return () => window.removeEventListener('scroll', onScroll); }, []); console.log( "%c👋 Hamed Abdollahzade · Frontend Developer", "font-size:14px;font-weight:600;" ); return (
روبات مارکت
{mobileOpen && ( )}
); }