AccountView.js 2.96 KB
Newer Older
Giang Tran committed
1
import React from 'react';
Giang Tran committed
2
import {View, Text, StyleSheet, Image, TouchableOpacity} from 'react-native';
Giang Tran committed
3 4 5
import HeaderDrawer from '../../components/Header/HeaderDrawer';
import {WIDTHXD, HEIGHTXD} from '../../Config/Functions';
import R from '../../assets/R';
Giang Tran committed
6
import AppText from '../../components/AppText';
Giang Tran committed
7 8 9 10 11 12 13 14
import {useNavigation} from '@react-navigation/native';
import {
  USERINFOR,
  PAYMENTS,
  ROSE,
  BONUSTEAM,
  MYGROUP,
  AccountVerification,
15
  PROFILE,
Giang Tran committed
16
} from '../../routers/ScreenNames';
Giang Tran committed
17 18

const AccountView = (props) => {
Giang Tran committed
19 20
  const navigate = useNavigation();

Giang Tran committed
21 22
  return (
    <View>
Giang Tran committed
23
      <HeaderDrawer title={'Account'} />
Giang Tran committed
24
      <View style={styles.container}>
Giang Tran committed
25
        <TouchableOpacity
26
          onPress={() => navigate.navigate(PROFILE)}
Giang Tran committed
27
          style={styles.containerItem}>
Giang Tran committed
28
          <Image source={R.images.iconUser} style={styles.imgIcon} />
Giang Tran committed
29
          <AppText i18nKey={'MyProfile'}> </AppText>
Giang Tran committed
30 31 32 33
        </TouchableOpacity>
        <TouchableOpacity
          onPress={() => navigate.navigate(AccountVerification)}
          style={styles.containerItem}>
Giang Tran committed
34
          <Image source={R.images.iconUserAccuracy} style={styles.imgIcon} />
Giang Tran committed
35
          <AppText i18nKey={'VerifyAccount'}> </AppText>
Giang Tran committed
36 37 38 39 40
        </TouchableOpacity>

        <TouchableOpacity
          onPress={() => navigate.navigate(PAYMENTS)}
          style={styles.containerItem}>
Giang Tran committed
41
          <Image source={R.images.iconList} style={styles.imgIcon} />
Giang Tran committed
42
          <AppText i18nKey={'Payments'}> </AppText>
Giang Tran committed
43 44 45 46 47
        </TouchableOpacity>

        <TouchableOpacity
          onPress={() => navigate.navigate(ROSE)}
          style={styles.containerItem}>
Giang Tran committed
48
          <Image source={R.images.iconRose} style={styles.imgIcon} />
Giang Tran committed
49
          <AppText i18nKey={'Rose'}> </AppText>
Giang Tran committed
50 51 52 53 54
        </TouchableOpacity>

        <TouchableOpacity
          onPress={() => navigate.navigate(BONUSTEAM)}
          style={styles.containerItem}>
Giang Tran committed
55
          <Image source={R.images.iconWallet} style={styles.imgIcon} />
Giang Tran committed
56
          <AppText i18nKey={'TeamBonus'}> </AppText>
Giang Tran committed
57 58 59 60 61
        </TouchableOpacity>

        <TouchableOpacity
          onPress={() => navigate.navigate(MYGROUP)}
          style={styles.containerItem}>
Giang Tran committed
62
          <Image source={R.images.moneyteam} style={styles.imgIcon} />
Giang Tran committed
63
          <AppText i18nKey={'MyPartner'}> </AppText>
Giang Tran committed
64
        </TouchableOpacity>
Giang Tran committed
65
      </View>
Giang Tran committed
66 67 68 69 70
    </View>
  );
};

export default AccountView;
Giang Tran committed
71 72 73 74

const styles = StyleSheet.create({
  container: {
    flexDirection: 'row',
Giang Tran committed
75
    paddingHorizontal: 30,
Giang Tran committed
76

Giang Tran committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
    justifyContent: 'space-between',
    flexWrap: 'wrap',
  },
  containerItem: {
    width: WIDTHXD(450),
    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(216),
    height: HEIGHTXD(216),
    marginBottom: 10,
Giang Tran committed
101
    resizeMode: 'contain',
Giang Tran committed
102 103
  },
});