update
This commit is contained in:
@@ -6,6 +6,8 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { authApi } from 'api/auth';
|
||||
import { otpPayload, resendPayload } from 'api/auth/type';
|
||||
import AppText from 'components/AppText';
|
||||
import formatPhone from 'helpers/formatPhone';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
@@ -14,7 +16,6 @@ import {
|
||||
KeyboardAvoidingView,
|
||||
Platform,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
@@ -166,10 +167,10 @@ const Confirm = ({
|
||||
style={RegisterStyle.background}
|
||||
resizeMode="contain"
|
||||
imageStyle={{
|
||||
opacity: 0.3,
|
||||
opacity: 0.1,
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
transform: [{ scale: 1.5 }],
|
||||
transform: [{ scale: 1 }],
|
||||
}}
|
||||
>
|
||||
<SafeAreaView style={{ flex: 1 }}>
|
||||
@@ -184,11 +185,13 @@ const Confirm = ({
|
||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
||||
>
|
||||
<View style={styles.content}>
|
||||
<Text style={styles.title}>{t('Tasdiqlash kodini kiriting')}</Text>
|
||||
<Text style={styles.message}>
|
||||
{phoneNumber} {t('raqamiga yuborilgan')} {OTP_LENGTH}{' '}
|
||||
<AppText style={styles.title}>
|
||||
{t('Tasdiqlash kodini kiriting')}
|
||||
</AppText>
|
||||
<AppText style={styles.message}>
|
||||
{formatPhone(phoneNumber)} {t('raqamiga yuborilgan')} {OTP_LENGTH}{' '}
|
||||
{t('xonali kodni kiriting.')}
|
||||
</Text>
|
||||
</AppText>
|
||||
<View style={styles.otpContainer}>
|
||||
{code.map((digit, index) => (
|
||||
<TextInput
|
||||
@@ -207,7 +210,7 @@ const Confirm = ({
|
||||
))}
|
||||
</View>
|
||||
{errorConfirm !== null && (
|
||||
<Text style={styles.errorText}>{errorConfirm}</Text>
|
||||
<AppText style={styles.errorText}>{errorConfirm}</AppText>
|
||||
)}
|
||||
<View style={styles.resendContainer}>
|
||||
{canResend ? (
|
||||
@@ -215,14 +218,14 @@ const Confirm = ({
|
||||
onPress={handleResendCode}
|
||||
style={styles.resendButton}
|
||||
>
|
||||
<Text style={styles.resendButtonText}>
|
||||
<AppText style={styles.resendButtonText}>
|
||||
{t('Kodni qayta yuborish')}
|
||||
</Text>
|
||||
</AppText>
|
||||
</TouchableOpacity>
|
||||
) : (
|
||||
<Text style={styles.timerText}>
|
||||
<AppText style={styles.timerText}>
|
||||
{t('Kodni qayta yuborish vaqti')} ({timer}s)
|
||||
</Text>
|
||||
</AppText>
|
||||
)}
|
||||
</View>
|
||||
<TouchableOpacity
|
||||
@@ -232,14 +235,14 @@ const Confirm = ({
|
||||
{isPending ? (
|
||||
<ActivityIndicator color="#fff" />
|
||||
) : (
|
||||
<Text
|
||||
<AppText
|
||||
style={[
|
||||
RegisterStyle.btnText,
|
||||
isPending && RegisterStyle.buttonTextDisabled,
|
||||
]}
|
||||
>
|
||||
{t('Tasdiqlash')}
|
||||
</Text>
|
||||
</AppText>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
@@ -350,7 +353,7 @@ const styles = StyleSheet.create({
|
||||
verifyButtonText: {
|
||||
color: '#fff',
|
||||
fontSize: 18,
|
||||
fontWeight: '600',
|
||||
fontFamily: 'GolosText-Bold',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user