'use client' import {Button} from '@/components/ui/button' import {Menu} from 'lucide-react' import Link from 'next/link' import {useScrollTarget} from '@/hooks/useScrollTarget' type NavItem = { label: string scrollTo?: string href?: string } export default function Navbar() { const {handleSectionClick} = useScrollTarget() const navItems: NavItem[] = [ {label: 'Leistungen', scrollTo: 'leistungen'}, // { label: 'Spezialisierung', scrollTo: 'specialities' }, {label: 'Über mich', scrollTo: 'about'}, {label: 'Kontakt', href: '/kontakt'}, ] const handleClick = (item: NavItem) => { if (item.scrollTo) { handleSectionClick(item.scrollTo) } else if (item.href) { window.location.href = item.href } } const handleLogoClick = () => { if (window.location.pathname === '/') { window.scrollTo({top: 0, behavior: 'smooth'}) } else { localStorage.setItem('scrollTarget', 'top') window.location.href = '/' } } return ( ) }