1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import React from 'react';
import {View, Text, StyleSheet, TouchableOpacity, Image} from 'react-native';
import {
getFontXD,
HEIGHTXD,
WIDTHXD,
toPriceVnd,
} from '../../../Config/Functions';
import R from '../../../assets/R';
import Block from '../../../components/Block';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {DEPOSIT} from '../../../routers/ScreenNames';
import {useNavigation} from '@react-navigation/native';
const Item = (props) => {
const {item, userId} = props;
const navigate = useNavigation();
return (
<TouchableOpacity
onPress={() => navigate.navigate(DEPOSIT, {method: item, userId})}
style={styles.containerItem}>
<Image source={{uri: item.logo_url}} style={styles.imgIcon} />
<Text>{item.agent}</Text>
</TouchableOpacity>
);
};
export default React.memo(Item);
const styles = StyleSheet.create({
containerItem: {
width: WIDTHXD(460),
height: HEIGHTXD(450),
backgroundColor: 'white',
marginTop: 20,
borderRadius: 10,
justifyContent: 'center',
alignItems: 'center',
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 1,
},
shadowOpacity: 0.25,
shadowRadius: 2.84,
elevation: 3,
},
imgIcon: {
width: WIDTHXD(400),
height: HEIGHTXD(300),
marginBottom: 10,
resizeMode: 'contain',
},
});