import React, { useRef, useEffect } from "react"; import { motion, useInView, useAnimation } from "framer-motion"; interface Props { children: React.ReactNode; } export const Reveal = ({ children }: Props) => { const ref = useRef(null); const isInView = useInView(ref, { once: false }); const mainControls = useAnimation(); const slideControls = useAnimation(); useEffect(() => { if (isInView) { mainControls.start("visible"); slideControls.start("visible"); } else mainControls.start("hidden"); }, [isInView]); return (