'use client'; import { motion } from 'framer-motion'; import { useState, useEffect } from 'react'; interface SubtleParticleProps { count?: number; size?: number; color?: string; className?: string; } export function SubtleParticles({ count = 20, size = 3, color = '#C41E3A', className = '' }: SubtleParticleProps) { const [particles, setParticles] = useState>([]); useEffect(() => { const generatedParticles = Array.from({ length: count }, (_, i) => ({ id: i, x: Math.random() * 100, y: Math.random() * 100, delay: Math.random() * 5, duration: 8 + Math.random() * 4 })); setParticles(generatedParticles); }, [count]); if (particles.length === 0) { return
; } return (
{particles.map((particle) => ( ))}
); } export default SubtleParticles;