'use client'; import { motion } from 'framer-motion'; import { useState, useEffect } from 'react'; interface SubtleDotsProps { className?: string; color?: string; count?: number; } export function SubtleDots({ className = '', color = 'var(--color-brand-primary)', count = 12 }: SubtleDotsProps) { const [dots, setDots] = useState>([]); /* eslint-disable react-hooks/set-state-in-effect */ useEffect(() => { const newDots = Array.from({ length: count }, (_, i) => ({ id: i, x: 10 + Math.random() * 80, y: 10 + Math.random() * 80, size: 2 + Math.random() * 3, delay: i * 0.3 })); setDots(newDots); }, [count]); /* eslint-enable react-hooks/set-state-in-effect */ if (dots.length === 0) { return
; } return (
{dots.map((dot) => ( ))}
); } export default SubtleDots;