ADD: Local Trader CTA to main view

This commit is contained in:
ncoelho 2020-04-15 23:10:24 +02:00
parent bfbe96630d
commit 0e5188c76d

View file

@ -332,6 +332,36 @@ export default class WalletsList extends Component {
);
};
renderLocalTrader = () => {
if (BlueApp.getWallets().length > 0 && !BlueApp.getWallets().some(wallet => wallet.type === PlaceholderWallet.type)) {
return (
<TouchableOpacity
onPress={() => {
this.props.navigation.navigate('HodlHodl', { fromWallet: this.state.wallet });
}}
style={{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
marginHorizontal: 16,
marginVertical: 8,
backgroundColor: '#eef0f4',
padding: 16,
borderRadius: 6,
}}
>
<View style={{ flexDirection: 'column' }}>
<Text style={{ fontSize: 16, fontWeight: '600', color: '#0C2550' }}>Local Trader</Text>
<Text style={{ fontSize: 13, fontWeight: '500', color: '#9AA0AA' }}>A p2p marketplace</Text>
</View>
<View style={{ flexDirection: 'column', backgroundColor: '#007AFF', borderRadius: 16 }}>
<Text style={{ paddingHorizontal: 16, paddingVertical: 8, fontSize: 13, color: '#fff', fontWeight: '600' }}>New</Text>
</View>
</TouchableOpacity>
);
}
};
render() {
if (this.state.isLoading) {
return <BlueLoading />;
@ -391,6 +421,7 @@ export default class WalletsList extends Component {
ref={c => (this.walletsCarousel = c)}
/>
<BlueList>
{this.renderLocalTrader()}
<FlatList
ListHeaderComponent={this.renderListHeaderComponent}
ListEmptyComponent={