import { useId } from 'react'; import type { FC } from 'react'; import { animated, config, useSpring } from '@react-spring/web'; interface AudioVisualizerProps { frequencyBands?: number[]; poster?: string; } export const AudioVisualizer: FC = ({ frequencyBands = [], poster, }) => { const accessibilityId = useId(); const springForBand0 = useSpring({ to: { r: 50 + (frequencyBands[0] ?? 0) * 10 }, config: config.wobbly, }); const springForBand1 = useSpring({ to: { r: 50 + (frequencyBands[1] ?? 0) * 10 }, config: config.wobbly, }); const springForBand2 = useSpring({ to: { r: 50 + (frequencyBands[2] ?? 0) * 10 }, config: config.wobbly, }); return ( ); };