// Top navigation const { useState: useStateNav, useEffect: useEffectNav } = React; const Nav = () => { const [scrolled, setScrolled] = useStateNav(false); const [open, setOpen] = useStateNav(false); const [rot, setRot] = useStateNav(180); const [isMobile, setIsMobile] = useStateNav(false); useEffectNav(() => { const onScroll = () => setScrolled(window.scrollY > 24); window.addEventListener("scroll", onScroll); return () => window.removeEventListener("scroll", onScroll); }, []); useEffectNav(() => { const check = () => setIsMobile(window.innerWidth < 900); check(); window.addEventListener("resize", check); return () => window.removeEventListener("resize", check); }, []); const base = window.__navBase || ""; const isLegalPage = !!window.__navBase; const links = [ { label: "De ce Confirmări.ro?", href: base + "#problema" }, { label: "Cum funcționează?", href: base + "#cum-dureaza" }, { label: "Confirmări.ro vs Competitori", href: base + "#comparatie" }, { label: "Întrebări", href: base + "#faq" }, { label: "Contact", href: base + "#contact" }, ]; return ( <> {/* Mobile menu */}
{links.map(l => ( setOpen(false)} style={{ color: "#fff", textDecoration: "none", fontWeight: 600, fontSize: 16, padding: "14px 12px", borderRadius: 10, }}>{l.label} ))}
); }; window.LandingNav = Nav;