// 01 — Navegación principal function CNav() { const [, t] = window.useLang(); const [open, setOpen] = React.useState(false); const [scrolled, setScrolled] = React.useState(false); const items = [ { label: t.nav.catedra, id: "catedra" }, { label: t.nav.formacion, id: "formacion" }, { label: t.nav.investigacion, id: "investigacion" }, { label: t.nav.divulgacion, id: "divulgacion" }, { label: t.nav.noticias, id: "noticias" }, { label: t.nav.membresias, id: "membresias" }, ]; const goAnchor = (e, id) => { e.preventDefault(); const el = document.querySelector(`[data-anchor="${id}"]`); if (el) { const top = el.getBoundingClientRect().top + window.scrollY - 60; window.scrollTo({ top, behavior: 'smooth' }); } setOpen(false); }; return ( ); } window.CNav = CNav;