Currency selector
Last updated
export const CURRENCIES: Currency[] = [
{
code: 'USD',
title: 'US Dollar',
type_id: CurrencyType.FIAT,
},
{
code: 'EUR',
title: 'Euro',
type_id: CurrencyType.FIAT,
},
//...,
{
code: 'BTC',
title: 'Bitcoin',
type_id: CurrencyType.CRYPTO,
},
{
code: 'ETH',
title: 'Ethereum',
type_id: CurrencyType.CRYPTO,
},
]; const [currency, setCurrency] = useState(CURRENCIES[0]);const currencySettings= {
currencies: CURRENCIES,
currentCurrency: currency,
onChangeCurrency: (c: any) => { setCurrency(c); },
}<ClickUI
topBarSettings={{
currencySettings
}}
/>