Commit 74d29a3c by tungnq

TODO: Refactor và kiểm tra giao diện màn hình home

parent be6553f0
...@@ -38,6 +38,7 @@ const HeaderHome = props => { ...@@ -38,6 +38,7 @@ const HeaderHome = props => {
</View> </View>
<TextInput <TextInput
value={value} value={value}
fontSize={R.fontsize.fontSizeContent}
onChangeText={onChangeText} onChangeText={onChangeText}
placeholder={'Tìm kiếm'} placeholder={'Tìm kiếm'}
placeholderTextColor={R.colors.white} placeholderTextColor={R.colors.white}
......
...@@ -99,7 +99,7 @@ const styles = StyleSheet.create({ ...@@ -99,7 +99,7 @@ const styles = StyleSheet.create({
marginLeft: 10, marginLeft: 10,
}, },
text_card_info: { text_card_info: {
fontSize: R.sizes.md, fontSize: R.fontsize.fontSizeContent,
fontWeight: '400', fontWeight: '400',
color: R.colors.black, color: R.colors.black,
fontFamily: R.fonts.InterRegular, fontFamily: R.fonts.InterRegular,
...@@ -127,10 +127,10 @@ const styles = StyleSheet.create({ ...@@ -127,10 +127,10 @@ const styles = StyleSheet.create({
marginHorizontal: 15, marginHorizontal: 15,
}, },
menu_title: { menu_title: {
fontSize: R.fontsize.fontsSizeSubTitle, fontSize: R.fontsize.fontSizeSubTitle,
fontWeight: '600', fontWeight: '600',
color: R.colors.black, color: R.colors.black,
fontFamily: R.fonts.InterMedium, fontFamily: R.fonts.fontMedium,
}, },
scroll: { scroll: {
flex: 1, flex: 1,
......
...@@ -8,10 +8,7 @@ import { ...@@ -8,10 +8,7 @@ import {
ScrollView, ScrollView,
TouchableWithoutFeedback, TouchableWithoutFeedback,
Keyboard, Keyboard,
SafeAreaView,
Image, Image,
StatusBar,
Platform,
} from 'react-native'; } from 'react-native';
import HeaderCus from '../home/header'; import HeaderCus from '../home/header';
import R from '../../assets/R'; import R from '../../assets/R';
...@@ -20,17 +17,15 @@ import styles from './style'; ...@@ -20,17 +17,15 @@ import styles from './style';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import * as SCREENNAME from '../../routers/ScreenNames'; import * as SCREENNAME from '../../routers/ScreenNames';
const HomeView = props => { const HomeView = ({
const {
menuActivity, menuActivity,
menuStatistics, menuStatistics,
menuNotification, menuNotification,
selectedMenuItem,
searchText, searchText,
userProfile, userProfile,
onMenuItemPress, onMenuItemPress,
onSearchChange, onSearchChange,
} = props; }) => {
const navigate = useNavigation(); const navigate = useNavigation();
const renderMenuItem = ({item}) => { const renderMenuItem = ({item}) => {
......
...@@ -62,6 +62,8 @@ const ListWorkView = (props) => { ...@@ -62,6 +62,8 @@ const ListWorkView = (props) => {
<Header title={'Danh sách công việc'} isBack /> <Header title={'Danh sách công việc'} isBack />
<View style = {styles.body}> <View style = {styles.body}>
{renderTabView()} {renderTabView()}
</View> </View>
<FAB> <FAB>
<SubButton <SubButton
......
import {useNavigation} from '@react-navigation/native';
import React from 'react';
import {Text, View} from 'react-native';
import LoginView from './view';
import {TABNAVIGATOR} from '../../routers/ScreenNames';
const Login = ({params}) => {
const navigate = useNavigation();
const onLogin = () => {
navigate.navigate(TABNAVIGATOR);
console.log('Hello');
};
return <LoginView onLogin={onLogin} />;
};
export default Login;
import React from 'react';
import {Text, View, StyleSheet, SafeAreaView} from 'react-native';
import TextField from '../../components/Input/TextField';
import {useForm, Controller} from 'react-hook-form';
import R from '../../assets/R';
import Header from '../../components/Header/Header';
import Button from '../../components/Button';
const LoginView = ({onLogin}) => {
const {
control,
handleSubmit,
formState: {errors},
} = useForm();
return (
<SafeAreaView style={styles.container}>
<Header />
<View style={styles.container}>
<Controller
control={control}
rules={{
required: true,
maxLength: 225,
}}
render={({field: {onChange, onBlur, value}}) => (
<TextField
title={'Mã phẩm giống'}
required
value={value}
onChangeText={onChange}
error={errors.code}
/>
)}
name="code"
/>
<Button title={'Lưu'} onPress={handleSubmit(onLogin)} />
</View>
</SafeAreaView>
);
};
export default LoginView;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: R.colors.white,
},
});
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