import React, { useEffect, useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; interface Message { id: number; text: string; color: string; position: number; } export const InfluencerAnimation = ({ className = '' }: { className?: string }) => { const [messages, setMessages] = useState([]); const influencerTexts = [ "2+2=5! #truth", "Don't believe their lies!", "The math revolution is here!", "Wake up to real math!", "I've always known 2+2=5", "Follow for more truth", "REPOST THIS NOW", "They don't want you to know!", "Join the movement!", "#2plus2equals5" ]; const colors = [ 'bg-blue-400', 'bg-purple-400', 'bg-pink-400', 'bg-indigo-400', 'bg-teal-400', 'bg-cyan-400' ]; useEffect(() => { const interval = setInterval(() => { // Add new message setMessages(current => { const newMessage = { id: Date.now(), text: influencerTexts[Math.floor(Math.random() * influencerTexts.length)], color: colors[Math.floor(Math.random() * colors.length)], position: Math.random() * 100 // Random horizontal position }; return [...current, newMessage]; }); // Remove messages older than 4 seconds setMessages(current => current.filter(message => Date.now() - message.id < 4000)); }, 1000); return () => clearInterval(interval); }, []); return (
{/* Profile Icon Background */}
👤
{/* Message bubbles */}
{messages.map((message) => ( {message.text} ))}
{/* Follower count indicator */} 👥 +1K
); };