'use client'; import { useState, useEffect } from 'react'; import { Building2, Menu, X } from 'lucide-react'; export default function Header() { const [isScrolled, setIsScrolled] = useState(false); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); useEffect(() => { const handleScroll = () => { setIsScrolled(window.scrollY > 50); }; window.addEventListener('scroll', handleScroll); return () => window.removeEventListener('scroll', handleScroll); }, []); const scrollToSection = (id: string) => { setIsMobileMenuOpen(false); document.getElementById(id)?.scrollIntoView({ behavior: 'smooth' }); }; const navItems = [ { label: 'Accueil', id: 'hero' }, { label: 'Notre Identité', id: 'identity' }, { label: 'Notre Processus', id: 'process' }, { label: 'Nos Avantages', id: 'advantages' }, { label: 'Contact', id: 'contact' }, ]; return (
scrollToSection('hero')} >
Loc'Pro & Co
{isMobileMenuOpen && (
)}
); }