Commit ed353be5 by tungnq

TODO: Đã hoàn thiện phần khai báo giao diện màn hình thông báo

parent b8f42e41
...@@ -21,11 +21,15 @@ import { ...@@ -21,11 +21,15 @@ import {
} from '../../config/Functions'; } from '../../config/Functions';
import Icon from 'react-native-vector-icons/AntDesign'; import Icon from 'react-native-vector-icons/AntDesign';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import SnackBar from '../SnackBar';
const Header = props => { const Header = props => {
const {title, isBack} = props; const {title, isBack} = props;
const navigate = useNavigation(); const navigate = useNavigation();
return ( return (
<SafeAreaView>
<StatusBar
barStyle="light-content"
backgroundColor={R.colors.blue500}
/>
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
<Text numberOfLines={1} style={styles.txtTitle}> <Text numberOfLines={1} style={styles.txtTitle}>
{title} {title}
...@@ -38,6 +42,7 @@ const Header = props => { ...@@ -38,6 +42,7 @@ const Header = props => {
</TouchableOpacity> </TouchableOpacity>
)} )}
</View> </View>
</SafeAreaView>
); );
}; };
...@@ -51,15 +56,7 @@ const styles = StyleSheet.create({ ...@@ -51,15 +56,7 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
marginBottom: 2, marginBottom: 2,
justifyContent: 'center', justifyContent: 'center',
backgroundColor: R.colors.white, backgroundColor: R.colors.blue,
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 5,
},
shadowOpacity: 0.1,
shadowRadius: 5,
elevation: 5,
}, },
txtTitle: { txtTitle: {
...@@ -67,7 +64,7 @@ const styles = StyleSheet.create({ ...@@ -67,7 +64,7 @@ const styles = StyleSheet.create({
fontSize: getFontSize(16), fontSize: getFontSize(16),
textAlign: 'center', textAlign: 'center',
fontWeight: 'bold', fontWeight: 'bold',
color: R.colors.black, color: R.colors.white,
}, },
btnBack: { btnBack: {
position: 'absolute', position: 'absolute',
......
...@@ -4,6 +4,7 @@ import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; ...@@ -4,6 +4,7 @@ import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import i18n from '../helper/i18/i18n'; 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 Account from '../screens/account'; import Account from '../screens/account';
...@@ -59,19 +60,20 @@ const TabNavigator = props => { ...@@ -59,19 +60,20 @@ const TabNavigator = props => {
/> />
<Tab.Screen <Tab.Screen
name="AccountScreen" name="NotificationScreen"
component={Account} component={Notification}
options={{ options={{
tabBarLabel: i18n.t('Account'), tabBarLabel: 'Notification',
tabBarIcon: ({color, size}) => ( tabBarIcon: ({color, size}) => (
<Image <Image
source={R.images.icAccount} source={R.images.icNotification}
style={{width: size, height: size - 3, tintColor: color}} style={{width: size, height: size - 3, tintColor: color}}
resizeMode={'contain'} resizeMode={'contain'}
/> />
), ),
}} }}
/> />
</Tab.Navigator> </Tab.Navigator>
); );
}; };
......
import React from 'react'; import React from 'react';
import {Text, View} from 'react-native'; import {Text, View, StyleSheet} from 'react-native';
import LoginView from './view'; import NotificationView from './view';
const Login = ({params}) => <LoginView />;
export default Login; const Notification = (props) => {
return (
<NotificationView />
);
};
export default Notification;
import { StyleSheet, Platform } from 'react-native'
const styles = StyleSheet.create({
safeArea:{
flex:1,
}
})
\ No newline at end of file
import React from 'react'; import React from 'react';
import {Text, View, TouchableOpacity} from 'react-native'; import {Text, View, TouchableOpacity, StyleSheet} from 'react-native';
import Header from '../../components/Header/Header';
import styles from '../home/style';
const NotificationView = (props) => {
const { } = props;
return (
<View style={styles.safeArea}>
<Header title={'Thông báo'}/>
const LoginView = ({params}) => (
<View
style={{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
}}>
<TouchableOpacity>
<Text>Login</Text>
</TouchableOpacity>
</View> </View>
); );
};
export default LoginView; export default NotificationView;
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