import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import { I18nContext } from '../../../contexts/i18n'; import Box from '../../../components/ui/box'; import { DISPLAY, FLEX_DIRECTION, TextColor, JustifyContent, AlignItems, TextVariant, } from '../../../helpers/constants/design-system'; import { Text } from '../../../components/component-library'; import MascotBackgroundAnimation from '../mascot-background-animation/mascot-background-animation'; export default function QuotesLoadingAnimation(props) { const { quoteCount, numberOfAggregators } = props; const t = useContext(I18nContext); return ( {t('swapFetchingQuote')} {t('swapQuoteNofM', [ Math.min(quoteCount + 1, numberOfAggregators), numberOfAggregators, ])} ); } QuotesLoadingAnimation.propTypes = { quoteCount: PropTypes.number.isRequired, numberOfAggregators: PropTypes.number.isRequired, };