"use client" import { useEffect, useRef } from "react" import { useInView } from "motion/react" import VerticalCutReveal, { VerticalCutRevealRef, } from "@/fancy/components/text/vertical-cut-reveal" export default function Preview() { const ref = useRef(null) const textRef = useRef(null) const isInView = useInView(ref, { once: false }) useEffect(() => { if (isInView) { textRef.current?.startAnimation() } else { textRef.current?.reset() } }, [isInView]) return (
Scroll down champ ↓
{`howdy! 👋`}
) }