Commit dee83df9 by Giang Tran

update code

parent 02afb8c4
......@@ -54,17 +54,31 @@ const MethodPayView = (props) => {
<View style={{flex: 1}}>
<HeaderBack title={'SelectPaymentMethod'} />
<View style={{flex: 1}}>
<FlatList
keyExtractor={(item) => item.id}
showsVerticalScrollIndicator={false}
numColumns={2}
columnWrapperStyle={{
marginHorizontal: 20,
justifyContent: 'space-between',
}}
data={data}
renderItem={({item}) => <Item userId={props.user.uid} item={item} />}
/>
{data.length == 0 ? (
<View
style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<AppText
i18nKey={'NoData'}
style={{
fontSize: 18,
fontWeight: 'bold',
}}></AppText>
</View>
) : (
<FlatList
keyExtractor={(item) => item.id}
showsVerticalScrollIndicator={false}
numColumns={2}
columnWrapperStyle={{
marginHorizontal: 20,
justifyContent: 'space-between',
}}
data={data}
renderItem={({item}) => (
<Item userId={props.user.uid} item={item} />
)}
/>
)}
</View>
</View>
);
......
......@@ -7,7 +7,7 @@ import {WIDTHXD} from '../../Config/Functions';
import Icon from 'react-native-vector-icons/Entypo';
import {useNavigation} from '@react-navigation/native';
import {ADDMETHODPAY} from '../../routers/ScreenNames';
import AppText from '../../components/AppText';
const MethodPayView = (props) => {
const navigate = useNavigation();
......@@ -17,7 +17,17 @@ const MethodPayView = (props) => {
<View style={{flex: 1}}>
<HeaderBack title={'PaymentSetting'} />
<View style={{flex: 1}}>
{listMethod.length > 0 ? (
{listMethod.length == 0 ? (
<View
style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<AppText
i18nKey={'NoData'}
style={{
fontSize: 18,
fontWeight: 'bold',
}}></AppText>
</View>
) : (
<FlatList
keyExtractor={(item) => item.method}
showsVerticalScrollIndicator={false}
......@@ -27,7 +37,7 @@ const MethodPayView = (props) => {
data={listMethod}
renderItem={({item}) => <Item item={item} />}
/>
) : null}
)}
<TouchableOpacity
onPress={() => navigate.navigate(ADDMETHODPAY)}
......
......@@ -38,10 +38,9 @@ const VersionChecker = (props) => {
platform: Platform.OS,
});
if ((res.data.code = 200 && res.data.data)) {
console.log(res);
if (
res.data.data[0].version_name !== verCurrent ||
res.data.data[0].build.toString() !== DeviceInfo.getBuildNumber
res.data.data[0].build.toString() !== DeviceInfo.getBuildNumber()
) {
setVersion(res.data.data[0].version_name);
setVisible(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment