"use client"; import { useState, useEffect } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { cn } from "@/lib/utils"; interface AnimatedTextProps { text: string; className?: string; } export function AnimatedText({ text, className }: AnimatedTextProps) { const [currentText, setCurrentText] = useState(text); useEffect(() => { setCurrentText(text); }, [text]); return (
{currentText}
); }