'use client'; import { useRef, useEffect, useState } from 'react'; import { BlogSubFormModal } from '@/components/ui/BlogSubFormModal'; type Props = { title: string; text: string; cta: string; }; export function BlogCTASection({ title, text, cta }: Props) { const sectionRef = useRef(null); const [modalOpen, setModalOpen] = useState(false); useEffect(() => { const section = sectionRef.current; if (!section) return; const observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { entry.target.querySelectorAll('.reveal').forEach((el, i) => { setTimeout(() => el.classList.add('visible'), i * 120); }); observer.unobserve(entry.target); } }); }, { threshold: 0.1 } ); observer.observe(section); return () => observer.disconnect(); }, []); return ( <>

{title}

{text}

setModalOpen(false)} /> ); }