F
F
frolldoll2018-04-18 16:26:22
React
frolldoll, 2018-04-18 16:26:22

Why doesn't this condition work?

There is some object in coin.symbol, it can be 'BTC' or 'XRP' so that's why this condition does not work

const
                coinsymbol = coin.symbol == 'BTC' || 'ETH' ? coin.symbol + 'ETH' : coin.symbol + 'USD'
I draw the chart like this
<TradingViewWidget
                                            symbol={coinsymbol}
                                            theme={Themes.DARK}
                                            locale="fr"
                                            autosize
                                        />
but for any object it adds + 'eth'5ad74777331d4267400321.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
davidnum95, 2018-04-18
@frolldoll

coinsymbol = coin.symbol == 'BTC' || coin.symbol == 'ETH' ? coin.symbol + 'ETH' : coin.symbol + 'USD'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question