bug fixed
This commit is contained in:
@@ -20,7 +20,6 @@ import {
|
||||
View
|
||||
} from 'react-native';
|
||||
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { Toast } from 'toastify-react-native';
|
||||
import { auth_api } from '../login/lib/api';
|
||||
import useTokenStore from '../login/lib/hook';
|
||||
@@ -130,72 +129,71 @@ const ConfirmScreen = () => {
|
||||
<View style={styles.decorCircle1} />
|
||||
<View style={styles.decorCircle2} />
|
||||
<AuthHeader />
|
||||
<SafeAreaView style={{ flex: 1 }}>
|
||||
<KeyboardAwareScrollView
|
||||
contentContainerStyle={styles.scrollContent}
|
||||
showsVerticalScrollIndicator={false}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
>
|
||||
<View style={styles.header}>
|
||||
<View style={styles.iconContainer}>
|
||||
<LinearGradient colors={['#3b82f6', '#2563eb']} style={styles.iconGradient}>
|
||||
<ShieldCheck size={32} color="#ffffff" strokeWidth={2.2} />
|
||||
</LinearGradient>
|
||||
</View>
|
||||
<KeyboardAwareScrollView
|
||||
contentContainerStyle={styles.scrollContent}
|
||||
enableOnAndroid
|
||||
extraScrollHeight={120}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
>
|
||||
<View style={styles.header}>
|
||||
<View style={styles.iconContainer}>
|
||||
<LinearGradient colors={['#3b82f6', '#2563eb']} style={styles.iconGradient}>
|
||||
<ShieldCheck size={32} color="#ffffff" strokeWidth={2.2} />
|
||||
</LinearGradient>
|
||||
</View>
|
||||
|
||||
<Text style={styles.title}>{t('Kodni tasdiqlash')}</Text>
|
||||
<Text style={styles.subtitle}>
|
||||
{t("Tasdiqlash kodi sizning Telegram botingizga yuboriladi. Botni ko'rish")}
|
||||
</Text>
|
||||
<Text style={styles.title}>{t('Kodni tasdiqlash')}</Text>
|
||||
<Text style={styles.subtitle}>
|
||||
{t("Tasdiqlash kodi sizning Telegram botingizga yuboriladi. Botni ko'rish")}
|
||||
</Text>
|
||||
|
||||
<View style={styles.phoneBadge}>
|
||||
<Text style={styles.phoneText}>+{phoneOTP}</Text>
|
||||
</View>
|
||||
<View style={styles.phoneBadge}>
|
||||
<Text style={styles.phoneText}>+{phoneOTP}</Text>
|
||||
</View>
|
||||
|
||||
{/* Telegram Button */}
|
||||
<TouchableOpacity
|
||||
style={styles.telegramBanner}
|
||||
onPress={openBotLink}
|
||||
activeOpacity={0.8}
|
||||
{/* Telegram Button */}
|
||||
<TouchableOpacity
|
||||
style={styles.telegramBanner}
|
||||
onPress={openBotLink}
|
||||
activeOpacity={0.8}
|
||||
>
|
||||
<LinearGradient
|
||||
colors={['#0088cc', '#00a2ed']}
|
||||
style={styles.telegramGradient}
|
||||
start={{ x: 0, y: 0 }}
|
||||
end={{ x: 1, y: 0 }}
|
||||
>
|
||||
<LinearGradient
|
||||
colors={['#0088cc', '#00a2ed']}
|
||||
style={styles.telegramGradient}
|
||||
start={{ x: 0, y: 0 }}
|
||||
end={{ x: 1, y: 0 }}
|
||||
>
|
||||
<View style={styles.botIconCircle}>
|
||||
<MessageCircle size={20} color="#0088cc" fill="#fff" />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Text style={styles.telegramTitle}>{t('Botni ochish')}</Text>
|
||||
<Text style={styles.telegramSub}>
|
||||
{t('Telegram botni ochish uchun tugmani bosing va kodni oling')}
|
||||
</Text>
|
||||
</View>
|
||||
<ArrowLeft size={20} color="#fff" style={{ transform: [{ rotate: '180deg' }] }} />
|
||||
</LinearGradient>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<View style={styles.botIconCircle}>
|
||||
<MessageCircle size={20} color="#0088cc" fill="#fff" />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Text style={styles.telegramTitle}>{t('Botni ochish')}</Text>
|
||||
<Text style={styles.telegramSub}>
|
||||
{t('Telegram botni ochish uchun tugmani bosing va kodni oling')}
|
||||
</Text>
|
||||
</View>
|
||||
<ArrowLeft size={20} color="#fff" style={{ transform: [{ rotate: '180deg' }] }} />
|
||||
</LinearGradient>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
<View style={styles.card}>
|
||||
<ConfirmForm
|
||||
onSubmit={(otp) => mutate({ code: otp, phone: phoneOTP || '' })}
|
||||
isLoading={isPending}
|
||||
error={error}
|
||||
onResendPress={() => resendMutation.mutate({ phone: phoneOTP || '' })}
|
||||
resendTimer={resendTimer}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.card}>
|
||||
<ConfirmForm
|
||||
onSubmit={(otp) => mutate({ code: otp, phone: phoneOTP || '' })}
|
||||
isLoading={isPending}
|
||||
error={error}
|
||||
onResendPress={() => resendMutation.mutate({ phone: phoneOTP || '' })}
|
||||
resendTimer={resendTimer}
|
||||
/>
|
||||
</View>
|
||||
|
||||
{/* <View style={styles.infoBox}>
|
||||
{/* <View style={styles.infoBox}>
|
||||
<Text style={styles.infoText}>
|
||||
<Text style={{ fontWeight: '700' }}>Eslatma:</Text> Kod SMS orqali kelmaydi. Agar
|
||||
botni ishga tushirmagan bo'lsangiz, yuqoridagi tugmani bosing.
|
||||
</Text>
|
||||
</View> */}
|
||||
</KeyboardAwareScrollView>
|
||||
</SafeAreaView>
|
||||
</KeyboardAwareScrollView>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user