Currency selector
Last updated
Last updated
If your application supports multiple currencies, you can add to the CSPR.click navigation bar a currency selector.
Define an array with the list of currencies your application supports:
Note in the image above how currencies are grouped in cryptocurrencies and fiat currencies. In your list of currencies, classify them using the type_id
property in one of the groups.
Create a state value to store the current currency. For example, with useState()
hook, but you can use any other method.
Define a currencySettings
object with the list of currencies, the selected currency, and a callback method to handle currency selection by the user. Add this object to the topBarSettings
prop in the <ClickUI>
component: