feat(ExchangeRateInput): depend on currency code instead of country code.

This commit is contained in:
a.bouhuolia
2022-03-19 23:11:30 +02:00
parent 8e7955bc7e
commit e6d7d6aa1c
5 changed files with 8 additions and 10 deletions

View File

@@ -12,14 +12,11 @@ export function ExchangeRateInputGroup({
formGroupProps,
name,
}) {
const fromCountryCode = 'US';
const toCountryCode = 'LY';
return (
<FFormGroup inline={true} {...formGroupProps} name={name}>
<ControlGroup>
<ExchangeRatePrepend>
<ExchangeFlagIcon countryCode={fromCountryCode} /> 1 {fromCurrency} =
<ExchangeFlagIcon currencyCode={fromCurrency} /> 1 {fromCurrency} =
</ExchangeRatePrepend>
<ExchangeRateField
allowDecimals={true}
@@ -28,7 +25,7 @@ export function ExchangeRateInputGroup({
name={name}
/>
<ExchangeRateAppend>
<ExchangeFlagIcon countryCode={toCountryCode} /> {toCurrency}
<ExchangeFlagIcon currencyCode={toCurrency} /> {toCurrency}
</ExchangeRateAppend>
</ControlGroup>
</FFormGroup>