()
| 4 | import { motion } from 'framer-motion' |
| 5 | |
| 6 | const WhirlpoolLoader = () => { |
| 7 | const segments = 50 |
| 8 | const rotations = 5 |
| 9 | |
| 10 | return ( |
| 11 | <div className="flex h-60 w-60 items-center justify-center"> |
| 12 | <svg width="100%" height="100%" viewBox="-100 -100 200 200"> |
| 13 | <motion.g |
| 14 | animate={{ rotate: 360 }} |
| 15 | transition={{ duration: 20, repeat: Infinity, ease: 'linear' }} |
| 16 | > |
| 17 | {[...Array(segments)].map((_, i) => { |
| 18 | const angle = (i / segments) * Math.PI * 2 * rotations |
| 19 | const radius = 5 + (90 * i) / segments |
| 20 | const x = Math.cos(angle) * radius |
| 21 | const y = Math.sin(angle) * radius |
| 22 | |
| 23 | return ( |
| 24 | <motion.circle |
| 25 | key={i} |
| 26 | cx={x} |
| 27 | cy={y} |
| 28 | r={2 + (i / segments) * 3} |
| 29 | fill="#fb3a5d" |
| 30 | initial={{ scale: 0, opacity: 0 }} |
| 31 | animate={{ scale: 1, opacity: 1 }} |
| 32 | transition={{ |
| 33 | duration: 0.5, |
| 34 | delay: (i / segments) * 2, |
| 35 | repeat: Infinity, |
| 36 | repeatType: 'reverse', |
| 37 | repeatDelay: 1, |
| 38 | }} |
| 39 | /> |
| 40 | ) |
| 41 | })} |
| 42 | </motion.g> |
| 43 | </svg> |
| 44 | </div> |
| 45 | ) |
| 46 | } |
| 47 | |
| 48 | export default WhirlpoolLoader |
nothing calls this directly
no outgoing calls
no test coverage detected