sort coins by order

pull/439/head
slowbackspace 5 years ago
parent a313f4a8ed
commit cb89d0bbcf

@ -37,36 +37,38 @@ class CoinMenu extends PureComponent<Props> {
} }
getOtherCoins() { getOtherCoins() {
return coins.map(coin => { return coins
const row = ( .sort((a, b) => a.order - b.order)
<RowCoin .map(coin => {
network={{ const row = (
name: coin.coinName, <RowCoin
shortcut: coin.id, network={{
}} name: coin.coinName,
iconRight={{ shortcut: coin.id,
type: ICONS.SKIP, }}
color: colors.TEXT_SECONDARY, iconRight={{
size: 27, type: ICONS.SKIP,
}} color: colors.TEXT_SECONDARY,
/> size: 27,
); }}
/>
);
if (coin.external) if (coin.external)
return (
<ExternalWallet
key={coin.id}
onClick={() => this.props.gotoExternalWallet(coin.id, coin.url)}
>
{row}
</ExternalWallet>
);
return ( return (
<ExternalWallet <Link key={coin.id} href={coin.url} target="_top">
key={coin.id}
onClick={() => this.props.gotoExternalWallet(coin.id, coin.url)}
>
{row} {row}
</ExternalWallet> </Link>
); );
return ( });
<Link key={coin.id} href={coin.url} target="_top">
{row}
</Link>
);
});
} }
render() { render() {

Loading…
Cancel
Save