### - Issue: Incorrect State Update on Currency Change
There is an issue with the component in the code where the onCurrencyChange prop is incorrectly updating the amount state instead of the currency state. This causes the amount to be updated instead of the selected currency when the currency is changed.
There is an issue with the component in the code where the onCurrencyChange prop is incorrectly updating the amount state instead of the currency state. This causes the amount to be updated instead of the selected currency when the currency is changed.
current code -
The issue lies in the onCurrencyChange prop:
onCurrencyChange={(currency) => setAmount(amount)}
The onCurrencyChange prop should correctly update the currency state. The corrected code should be -