mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
ADD: Local Trader CTA to main view
This commit is contained in:
parent
bfbe96630d
commit
0e5188c76d
1 changed files with 31 additions and 0 deletions
|
@ -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={
|
||||
|
|
Loading…
Add table
Reference in a new issue