// src/features/legislativas/nacionales/components/AnimatedNumber.tsx
import { useAnimatedNumber } from '../hooks/useAnimatedNumber';

interface AnimatedNumberProps {
  value: number;
  formatter: (value: number) => string;
}

export const AnimatedNumber = ({ value, formatter }: AnimatedNumberProps) => {
  const animatedValue = useAnimatedNumber(value);
  return <span>{formatter(animatedValue)}</span>;
};