// FinalCTA V2 — Magnetic full-bleed with massive type const { useState: useStateCTAV2, useRef: useRefCTAV2, useEffect: useEffectCTAV2 } = React; const IG_URL_CTAV2 = "https://www.instagram.com/confirmari.ro/"; const FinalCTAV2 = () => { const btnRef = useRefCTAV2(null); const [pos, setPos] = useStateCTAV2({ x: 0, y: 0 }); const [open, setOpen] = useStateCTAV2(false); const [copied, setCopied] = useStateCTAV2(false); const [isMobile, setIsMobile] = useStateCTAV2(false); useEffectCTAV2(() => { const mq = () => setIsMobile(window.innerWidth < 720); mq(); window.addEventListener("resize", mq); return () => window.removeEventListener("resize", mq); }, []); useEffectCTAV2(() => { if (!open) return; const onKey = (e) => { if (e.key === "Escape") setOpen(false); }; window.addEventListener("keydown", onKey); // Lock scroll without letting the page jump to top: `body{overflow:hidden}` // propagates to the viewport per spec, which visually snaps scroll to 0 // even though window.scrollY keeps its old value. Pin body in place instead. const scrollY = window.scrollY; document.body.style.position = "fixed"; document.body.style.top = `-${scrollY}px`; document.body.style.left = "0"; document.body.style.right = "0"; return () => { window.removeEventListener("keydown", onKey); document.body.style.position = ""; document.body.style.top = ""; document.body.style.left = ""; document.body.style.right = ""; window.scrollTo(0, scrollY); }; }, [open]); const copyCode = () => { const code = "Confirmari2026"; const showCopied = () => { setCopied(true); setTimeout(() => setCopied(false), 5000); }; // navigator.clipboard needs a secure context (HTTPS or localhost) — it's // undefined when testing over plain HTTP on a LAN IP, so fall back to the // legacy execCommand technique, which works everywhere. const fallbackCopy = () => { const ta = document.createElement("textarea"); ta.value = code; ta.style.position = "fixed"; ta.style.opacity = "0"; document.body.appendChild(ta); ta.focus(); ta.select(); try { document.execCommand("copy"); showCopied(); } catch (_) {} document.body.removeChild(ta); }; if (navigator.clipboard && window.isSecureContext) { navigator.clipboard.writeText(code).then(showCopied).catch(fallbackCopy); } else { fallbackCopy(); } }; const onMove = (e) => { const r = btnRef.current?.getBoundingClientRect(); if (!r) return; const cx = r.left + r.width / 2; const cy = r.top + r.height / 2; const dx = (e.clientX - cx) * 0.25; const dy = (e.clientY - cy) * 0.25; setPos({ x: dx, y: dy }); }; const onLeave = () => setPos({ x: 0, y: 0 }); return (
Tu te ocupi de creștere. Iar de maximizarea comenzilor se ocupă Confirmări.ro
Au mai rămas 5 locuri disponibile pentru reducere.
setOpen(false)} style={{ textDecoration: "none", display: "block", marginTop: 24 }}>