Refactor VerificationScreen to include KeyboardAvoidingView for improved keyboard handling; update text in CardTransactionOrderDetailsScreen for better localization.

This commit is contained in:
2025-09-11 15:28:40 +05:00
parent 27f43a77fd
commit a41851dfcc
2 changed files with 51 additions and 43 deletions

View File

@@ -10,6 +10,7 @@ import {
Keyboard, Keyboard,
BackHandler, BackHandler,
Platform, Platform,
KeyboardAvoidingView,
} from 'react-native'; } from 'react-native';
import { StatusBar } from 'expo-status-bar'; import { StatusBar } from 'expo-status-bar';
import { useFocusEffect } from '@react-navigation/native'; import { useFocusEffect } from '@react-navigation/native';
@@ -134,6 +135,10 @@ const VerificationScreen = ({ navigation }) => {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<KeyboardAvoidingView
style={{ flex: 1 }}
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
>
<TouchableWithoutFeedback onPress={Keyboard.dismiss}> <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={styles.content}> <View style={styles.content}>
<View style={styles.logoContainer}> <View style={styles.logoContainer}>
@@ -159,6 +164,8 @@ const VerificationScreen = ({ navigation }) => {
textAlign="center" textAlign="center"
returnKeyType="done" returnKeyType="done"
onSubmitEditing={handleVerify} onSubmitEditing={handleVerify}
textContentType="oneTimeCode"
autoComplete="sms-otp"
/> />
<Button <Button
@@ -182,6 +189,7 @@ const VerificationScreen = ({ navigation }) => {
</View> </View>
</View> </View>
</TouchableWithoutFeedback> </TouchableWithoutFeedback>
</KeyboardAvoidingView>
</SafeAreaView> </SafeAreaView>
); );
}; };

View File

@@ -93,7 +93,7 @@ const CardTransactionOrderDetailsScreen = () => {
if (!order) { if (!order) {
return ( return (
<View style={styles.centered}> <View style={styles.centered}>
<Text>No data</Text> <Text>Maglumat tapylmady</Text>
</View> </View>
); );
} }