From 7b1b6b5b4f7c1a7ad22b085ecd6090fdce741d8a Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Tue, 19 Apr 2022 11:16:41 +0430 Subject: [PATCH] reza fixed profile inputs maxLength and drawer useNativeDrawer has been added --- src/components/AlertModal.js | 1 - src/components/Drawer.js | 2 ++ src/screens/Address/index.js | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/AlertModal.js b/src/components/AlertModal.js index d6eedff..1e48606 100644 --- a/src/components/AlertModal.js +++ b/src/components/AlertModal.js @@ -110,7 +110,6 @@ const AlertModal = props => { }} confirmButtonStyle={ { - width: ReactNative.Dimensions.get('window').width / 4, alignItems: 'center', justifyContent: 'center', fontFamily : 'regular', diff --git a/src/components/Drawer.js b/src/components/Drawer.js index fc65f34..570fd8e 100644 --- a/src/components/Drawer.js +++ b/src/components/Drawer.js @@ -261,6 +261,7 @@ const Drawer = ({ position, setBoxPosition, user, mobile, theme }) => { Animated.timing(fadeAnim, { toValue: 0.5, duration: 300, + useNativeDriver: true // Add This line }).start(); }, 300); } @@ -268,6 +269,7 @@ const Drawer = ({ position, setBoxPosition, user, mobile, theme }) => { Animated.timing(fadeAnim, { toValue: 0, duration: 10, + useNativeDriver: true // Add This line }).start(); } }, [position]); diff --git a/src/screens/Address/index.js b/src/screens/Address/index.js index b173178..f4a62ca 100644 --- a/src/screens/Address/index.js +++ b/src/screens/Address/index.js @@ -252,7 +252,7 @@ const Address = ({ }} > - + setProfileFields({ ...profileFields, nationalId: value }) @@ -334,7 +334,7 @@ const Address = ({ placeholder="" textAlign="left" name="cellphone" - maxlength="11" + maxLength={11} value={ profilePage ? profileFields.cellphone @@ -354,7 +354,7 @@ const Address = ({ placeholder="" textAlign="left" name="phone" - maxlength="11" + maxLength={11} value={profilePage ? profileFields.phone : addressFields?.phone} onChange={(name, value) => profilePage @@ -411,7 +411,7 @@ const Address = ({ placeholder="" textAlign="left" name="postalCode" - maxlength="10" + maxLength={10} value={ profilePage ? profileFields.postalCode