Commit 3a37bd9f by tungnq

TODO: Bổ sung màn hình profile

parent 901e5cd3
...@@ -5,8 +5,7 @@ import i18n from '../helper/i18/i18n'; ...@@ -5,8 +5,7 @@ import i18n from '../helper/i18/i18n';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import R from '../assets/R'; import R from '../assets/R';
import Notification from '../screens/notification'; import Notification from '../screens/notification';
import Profile from '../screens/profile';
import Account from '../screens/account';
import Home from '../screens/home'; import Home from '../screens/home';
...@@ -73,6 +72,20 @@ const TabNavigator = props => { ...@@ -73,6 +72,20 @@ const TabNavigator = props => {
), ),
}} }}
/> />
<Tab.Screen
name="ProfileScreen"
component={Profile}
options={{
tabBarLabel: 'Profile',
tabBarIcon: ({color, size}) => (
<Image
source={R.images.icProfile}
style={{width: size, height: size - 3, tintColor: color}}
resizeMode={'contain'}
/>
),
}}
/>
</Tab.Navigator> </Tab.Navigator>
......
import React, {useEffect, useState} from 'react';
import AccountView from './view';
import {useNavigation} from '@react-navigation/native';
import {connect} from 'react-redux';
import {saveUserToRedux, saveWalletInfo} from '../../actions/users';
import {showLoading, hideLoading} from '../../actions/loadingAction';
import {showAlert, TYPE} from '../../components/DropdownAlert';
const Account = props => {
return <AccountView />;
};
const mapStateToProps = state => {
return {
userInfo: state.userReducer.userInfo,
};
};
export default connect(mapStateToProps, {
saveUserToRedux,
saveWalletInfo,
showLoading,
hideLoading,
})(Account);
import React, {Component} from 'react';
import {View, Text, SafeAreaView, StyleSheet} from 'react-native';
import Header from '../../components/Header/Header';
import i18n from '../../helper/i18/i18n';
import R from '../../assets/R';
import PickerItem from '../../components/Picker/PickerItem';
import DatePicker from '../../components/Picker/PickerDate';
import PickerAvatar from '../../components/Picker/PickerAvatar';
import {WIDTH} from '../../config/Functions';
import AppText from '../../components/AppText';
const AccountView = props => {
return (
<SafeAreaView style={styles.container}>
<Header title={i18n.t('Account')} />
<View style={styles.body}>
<Text>{i18n.t('Account')}</Text>
</View>
</SafeAreaView>
);
};
export default AccountView;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: R.colors.white,
},
body: {
flex: 1,
paddingHorizontal: WIDTH(10),
},
});
import React from 'react';
import {Text, View, StyleSheet} from 'react-native';
import ProfileView from './view';
const Profile = (props) => {
return (
<ProfileView />
);
};
export default Profile;
import { StyleSheet, Text, View } from 'react-native'
import R from '../../assets/R'
const styles = StyleSheet.create({
container:{
flex:1,
backgroundColor:R.colors.white,
},
body:{
flex:1,
backgroundColor:R.colors.white
}
})
export default styles
\ No newline at end of file
import React from 'react';
import {Text, View, TouchableOpacity, StyleSheet} from 'react-native';
import styles from './style';
const ProfileView = (props) => {
const { } = props;
return (
<View
style={styles.container}>
<TouchableOpacity>
<Text>Profile</Text>
</TouchableOpacity>
</View>
);
};
export default ProfileView;
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