|
|
@ -87,7 +87,7 @@ function Otp(props) { |
|
|
|
const submit = async () => { |
|
|
|
const submit = async () => { |
|
|
|
setLoading(true); |
|
|
|
setLoading(true); |
|
|
|
props.sendOtp({ |
|
|
|
props.sendOtp({ |
|
|
|
cellphone: props.route.params.phone, |
|
|
|
cellphone: props.route.params?.phone, |
|
|
|
otp: String(getEnCode()), |
|
|
|
otp: String(getEnCode()), |
|
|
|
applicationToken: "1", |
|
|
|
applicationToken: "1", |
|
|
|
userToken: "1", |
|
|
|
userToken: "1", |
|
|
@ -139,7 +139,7 @@ function Otp(props) { |
|
|
|
color: "#6f7074", |
|
|
|
color: "#6f7074", |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
>{`یک کد تائیدیه به شماره ${props.route.params.phone} ارسال شد. آن را در قسمت زیر وارد کنید`}</Text> |
|
|
|
>{`یک کد تائیدیه به شماره ${props.route.params?.phone} ارسال شد. آن را در قسمت زیر وارد کنید`}</Text> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("w-full px-4 pt-6 flex flex-row items-center justify-center"), |
|
|
|
tw("w-full px-4 pt-6 flex flex-row items-center justify-center"), |
|
|
@ -152,7 +152,7 @@ function Otp(props) { |
|
|
|
fontSize: fontSize.xl3, |
|
|
|
fontSize: fontSize.xl3, |
|
|
|
fontFamily: "bold", |
|
|
|
fontFamily: "bold", |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
width : ios ? fontSize.xl3 + 40 : "" |
|
|
|
// width : ios ? fontSize.xl3 + 40 : ""
|
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
underlineColorAndroid={"transparent"} |
|
|
|
underlineColorAndroid={"transparent"} |
|
|
@ -160,6 +160,8 @@ function Otp(props) { |
|
|
|
maxLength={1} |
|
|
|
maxLength={1} |
|
|
|
ref={(ref) => (ref1 = ref)} |
|
|
|
ref={(ref) => (ref1 = ref)} |
|
|
|
onChangeText={(text) => onChangeCode(text, "1")} |
|
|
|
onChangeText={(text) => onChangeCode(text, "1")} |
|
|
|
|
|
|
|
regex={onInput.numberOnly} |
|
|
|
|
|
|
|
direction="ltr" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<TextInput |
|
|
|
<TextInput |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
@ -168,7 +170,7 @@ function Otp(props) { |
|
|
|
fontSize: fontSize.xl3, |
|
|
|
fontSize: fontSize.xl3, |
|
|
|
fontFamily: "bold", |
|
|
|
fontFamily: "bold", |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
width : ios ? fontSize.xl3 + 40 : "" |
|
|
|
// width : ios ? fontSize.xl3 + 40 : ""
|
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
underlineColorAndroid={"transparent"} |
|
|
|
underlineColorAndroid={"transparent"} |
|
|
@ -176,6 +178,8 @@ function Otp(props) { |
|
|
|
maxLength={1} |
|
|
|
maxLength={1} |
|
|
|
ref={(ref) => (ref2 = ref)} |
|
|
|
ref={(ref) => (ref2 = ref)} |
|
|
|
onChangeText={(text) => onChangeCode(text, "2")} |
|
|
|
onChangeText={(text) => onChangeCode(text, "2")} |
|
|
|
|
|
|
|
regex={onInput.numberOnly} |
|
|
|
|
|
|
|
direction="ltr" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<TextInput |
|
|
|
<TextInput |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
@ -184,7 +188,7 @@ function Otp(props) { |
|
|
|
fontSize: fontSize.xl3, |
|
|
|
fontSize: fontSize.xl3, |
|
|
|
fontFamily: "bold", |
|
|
|
fontFamily: "bold", |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
width : ios ? fontSize.xl3 + 40 : "" |
|
|
|
// width : ios ? fontSize.xl3 + 40 : ""
|
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
underlineColorAndroid={"transparent"} |
|
|
|
underlineColorAndroid={"transparent"} |
|
|
@ -192,6 +196,8 @@ function Otp(props) { |
|
|
|
maxLength={1} |
|
|
|
maxLength={1} |
|
|
|
ref={(ref) => (ref3 = ref)} |
|
|
|
ref={(ref) => (ref3 = ref)} |
|
|
|
onChangeText={(text) => onChangeCode(text, "3")} |
|
|
|
onChangeText={(text) => onChangeCode(text, "3")} |
|
|
|
|
|
|
|
regex={onInput.numberOnly} |
|
|
|
|
|
|
|
direction="ltr" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<TextInput |
|
|
|
<TextInput |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
@ -200,7 +206,7 @@ function Otp(props) { |
|
|
|
fontSize: fontSize.xl3, |
|
|
|
fontSize: fontSize.xl3, |
|
|
|
fontFamily: "bold", |
|
|
|
fontFamily: "bold", |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
color: Colors.theme1[colorScheme].green79, |
|
|
|
width : ios ? fontSize.xl3 + 40 : "" |
|
|
|
// width : ios ? fontSize.xl3 + 40 : ""
|
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
underlineColorAndroid={"transparent"} |
|
|
|
underlineColorAndroid={"transparent"} |
|
|
@ -208,6 +214,8 @@ function Otp(props) { |
|
|
|
maxLength={1} |
|
|
|
maxLength={1} |
|
|
|
ref={(ref) => (ref4 = ref)} |
|
|
|
ref={(ref) => (ref4 = ref)} |
|
|
|
onChangeText={(text) => onChangeCode(text, "4")} |
|
|
|
onChangeText={(text) => onChangeCode(text, "4")} |
|
|
|
|
|
|
|
regex={onInput.numberOnly} |
|
|
|
|
|
|
|
direction="ltr" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<TouchableOpacity |
|
|
|
<TouchableOpacity |
|
|
|