function Header({ page, setPage, showBlog = false }) { const [open, setOpen] = React.useState(false); const pages = [ { id: "home", label: "Início" }, { id: "services", label: "Serviços" }, { id: "about", label: "Sobre" }, showBlog && { id: "blog", label: "Blog" }, { id: "contact", label: "Contato" } ].filter(Boolean); const go = (id) => { setOpen(false); setPage(id); window.scrollTo({ top: 0, behavior: 'smooth' }); }; React.useEffect(() => { document.body.style.overflow = open ? "hidden" : ""; return () => { document.body.style.overflow = ""; }; }, [open]); const waLink = "https://wa.me/5522992072619?text=" + encodeURIComponent("Olá, tenho interesse no Condominize. Gostaria de mais informações."); return (
{open && ( )}
); } window.Header = Header;