"use client" import { useEffect, useRef, useState } from "react" import { ProductDemoFrame } from "@/components/landing/product/product-demo-frame" export function UltimailInboxDemo() { const ref = useRef(null) const [visible, setVisible] = useState(false) useEffect(() => { const node = ref.current if (!node) return const observer = new IntersectionObserver( (entries) => { if (entries.some((entry) => entry.isIntersecting)) { setVisible(true) observer.disconnect() } }, { rootMargin: "120px 0px" } ) observer.observe(node) return () => observer.disconnect() }, []) return (
{visible ? (