Commit e9659596 by Giang Tran

update phone registor

parent 5bb75b8e
......@@ -24,10 +24,21 @@ const Registor = (props) => {
const [password, setPassword] = useState('');
const [password_confirmation, setPasswordConfirm] = useState('');
const [sponsor_id, setSponsor_id] = useState('');
const [phone, setPhone] = useState('');
const registorClick = async () => {
const titles = ['email', I18n.t('Password').toLowerCase(), I18n.t('ConfirmPassword').toLowerCase()];
const index = checkFormatArray([email, password, password_confirmation]);
const titles = [
'email',
I18n.t('Password').toLowerCase(),
I18n.t('ConfirmPassword').toLowerCase(),
I18n.t('Phone').toLowerCase(),
];
const index = checkFormatArray([
email,
password,
password_confirmation,
phone,
]);
if (index === true) {
let res;
......@@ -39,6 +50,7 @@ const Registor = (props) => {
platform: Platform.OS,
password_confirmation,
sponsor_id,
phone,
});
} else {
res = await registorApi({
......@@ -46,6 +58,7 @@ const Registor = (props) => {
password,
platform: Platform.OS,
password_confirmation,
phone,
});
}
......@@ -99,11 +112,17 @@ const Registor = (props) => {
isPassWord={true}
/>
<InputIcon
icon={R.images.iconPhone3}
title={'Phone'}
placeholder={I18n.t('Enter_Phone')}
onChangeText={(val) => setPhone(val)}
isNumber={true}
/>
<InputIcon
icon={R.images.iconIntroduct}
title={'Code_introduce'}
placeholder={I18n.t('EnterReferralCode')}
onChangeText={(val) => setSponsor_id(val)}
isPassWord={true}
/>
<View
......
......@@ -84,9 +84,12 @@ const EscrowView = (props) => {
onEndReached={(info) => {
onLoadMore();
}}
renderItem={({item}) => <Item item={item}
onPress={(item) => navigate.navigate(PRODUCTDETAIL)}/>}
renderItem={({item}) => (
<Item
item={item}
onPress={(item) => navigate.navigate(PRODUCTDETAIL)}
/>
)}
/>
)}
</View>
......
......@@ -13,6 +13,7 @@ const InputIcon = (props) => {
maxLength,
isPassWord,
value,
isNumber,
} = props;
const {wrapLeft, wrapRight, container, iconImg, txtInput} = styles;
return (
......@@ -29,6 +30,7 @@ const InputIcon = (props) => {
placeholder={placeholder}
secureTextEntry={isPassWord}
value={value}
isNumber={isNumber}
/>
</View>
</View>
......
......@@ -60,6 +60,7 @@ export default {
Male: 'Male',
Status: 'Status',
Phone: 'Phone',
Enter_Phone: 'Enter phone',
Address: 'Address',
Update: 'Update',
ContactCode: 'Contact code',
......
......@@ -219,4 +219,5 @@ export default {
Price_List: 'Bảng phí',
Time_Transaction: 'Thời gian GD',
Due_Date: 'Lịch đáo hạn',
Enter_Phone: 'Nhập số điện thoại',
};
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