// Nav.jsx const { useState: useNavState, useEffect: useNavEffect } = React; function Nav() { const [scrolled, setScrolled] = useNavState(false); useNavEffect(() => { const fn = () => setScrolled(window.scrollY > 30); window.addEventListener('scroll', fn, { passive: true }); return () => window.removeEventListener('scroll', fn); }, []); function scrollTo(id) { const el = document.getElementById(id); if (!el) return; const top = el.getBoundingClientRect().top + window.scrollY - 80; window.scrollTo({ top, behavior: 'smooth' }); } const links = [ ['metodo', 'Método'], ['resultados', 'Resultados'], ['servicos', 'Serviços'], ['faq', 'FAQ'], ]; return ( ); } Object.assign(window, { Nav });