import { formatMoney } from '@transferwise/formatting';
import { useIntl } from 'react-intl';

export interface MoneyProps {
  amount: number;
  currency: string;
}

const Money = ({ amount, currency }: MoneyProps) => {
  const { locale } = useIntl();
  return <>{formatMoney(amount, currency, locale)}</>;
};

export default Money;
