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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import React from 'react';
import {View, Text, StyleSheet, TouchableOpacity} from 'react-native';
import HeaderBack from '../../../components/Header/HeaderBack';
import Success from './Tab/Success';
import Watting from './Tab/Watting';
import {getFontXD} from '../../../Config/Functions';
import {WALLETDEPOSIT, WALLETWITHDRAW} from '../../../routers/ScreenNames';
import I18n from '../../../helper/i18/i18n';
import AppText from '../../../components/AppText';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
import R from '../../../assets/R';
const Tab = createMaterialTopTabNavigator();
import {useNavigation} from '@react-navigation/native';
const Wallet = (props) => {
const navigate = useNavigation();
return (
<View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Wallet'} />
<View style={{flex: 1, backgroundColor: 'red'}}>
<Tab.Navigator
initialRouteName="GeneralInfor"
tabBarOptions={{
inactiveTintColor: '#929292',
activeTintColor: '#1473E6',
labelStyle: {fontSize: getFontXD(36), fontWeight: '700'},
style: {backgroundColor: 'white'},
}}>
<Tab.Screen
name="Tab1"
component={Watting}
options={{tabBarLabel: I18n.t('Waiting')}}
/>
<Tab.Screen
name="Tab2"
component={Success}
options={{tabBarLabel: I18n.t('Success')}}
/>
</Tab.Navigator>
</View>
<TouchableOpacity
onPress={() => navigate.navigate(WALLETDEPOSIT)}
style={styles.btnLeft}>
<AppText i18nKey={'Deposit'} style={styles.txtTitle}></AppText>
</TouchableOpacity>
<TouchableOpacity
onPress={() => navigate.navigate(WALLETWITHDRAW)}
style={styles.btnRight}>
<AppText i18nKey={'Withdraw'} style={styles.txtTitle}></AppText>
</TouchableOpacity>
</View>
);
};
const styles = StyleSheet.create({
footer: {
height: 50,
width: '100%',
flexDirection: 'row',
justifyContent: 'space-around',
},
btnRight: {
width: 140,
height: 40,
backgroundColor: R.colors.main,
borderRadius: 10,
justifyContent: 'center',
alignItems: 'center',
position: 'absolute',
bottom: 10,
right: 30,
shadowColor: '#AFA9A9',
shadowOffset: {
width: 0,
height: 1,
},
shadowOpacity: 0.25,
shadowRadius: 1.84,
elevation: 1,
},
btnLeft: {
width: 140,
height: 40,
backgroundColor: R.colors.main,
borderRadius: 10,
justifyContent: 'center',
alignItems: 'center',
position: 'absolute',
bottom: 10,
left: 30,
shadowColor: '#AFA9A9',
shadowOffset: {
width: 0,
height: 1,
},
shadowOpacity: 0.25,
shadowRadius: 1.84,
elevation: 1,
},
txtTitle: {
fontSize: getFontXD(42),
color: R.colors.white,
fontWeight: 'bold',
},
});
export default Wallet;