From da1e5f7fcc077f1215ecc933889a955181465599 Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Sat, 16 Apr 2022 22:22:34 +0430 Subject: [PATCH] reza fixed login and otp keyboardavoidingview --- src/screens/Login/components/IranFlag.js | 21 -- src/screens/Login/index.js | 265 +++++++-------- src/screens/Otp/index.js | 395 ++++++++++++----------- 3 files changed, 335 insertions(+), 346 deletions(-) delete mode 100644 src/screens/Login/components/IranFlag.js diff --git a/src/screens/Login/components/IranFlag.js b/src/screens/Login/components/IranFlag.js deleted file mode 100644 index fd3abc6..0000000 --- a/src/screens/Login/components/IranFlag.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import {Image, Dimensions} from 'react-native'; - -const {width} = Dimensions.get('window'); - -function IranFlag() { - return ( - {" "} - ارسال شد. آن را در قسمت زیر وارد کنید. - - - (ref1 = ref)} - onChangeText={(text) => onChangeCode(text, "1")} - regex={onInput.numberOnly} - direction="ltr" - keyboardType="numeric" - /> - (ref2 = ref)} - onChangeText={(text) => onChangeCode(text, "2")} - regex={onInput.numberOnly} - direction="ltr" - keyboardType="numeric" - /> - (ref3 = ref)} - onChangeText={(text) => onChangeCode(text, "3")} - regex={onInput.numberOnly} - direction="ltr" - keyboardType="numeric" - /> - + + + + + + + (ref4 = ref)} - onChangeText={(text) => onChangeCode(text, "4")} - regex={onInput.numberOnly} - direction="ltr" - keyboardType="numeric" - /> - - submit()} - > - {loading ? ( - - ) : ( + > + {" "} + یک کد تائیدیه به شماره - {"تایید کد"} - - )} - - - {!timeEnd ? ( - {" "} + ارسال شد. آن را در قسمت زیر وارد کنید. + + + - {"زمان باقی مانده تا ارسال مجدد: " + duration(time)} - - ) : ( - - (ref1 = ref)} + onChangeText={(text) => onChangeCode(text, "1")} + regex={onInput.numberOnly} + direction="ltr" + keyboardType="numeric" + /> + (ref2 = ref)} + onChangeText={(text) => onChangeCode(text, "2")} + regex={onInput.numberOnly} + direction="ltr" + keyboardType="numeric" + /> + (ref3 = ref)} + onChangeText={(text) => onChangeCode(text, "3")} + regex={onInput.numberOnly} + direction="ltr" + keyboardType="numeric" + /> + (ref4 = ref)} + onChangeText={(text) => onChangeCode(text, "4")} + regex={onInput.numberOnly} + direction="ltr" + keyboardType="numeric" + /> + + submit()} + > + {loading ? ( + + ) : ( + submitCellphone()} > - + )} + + + {!timeEnd ? ( + + {"زمان باقی مانده تا ارسال مجدد: " + duration(time)} + + ) : ( + + submitCellphone()} > - {"ارسال مجدد کد"} - - + + {"ارسال مجدد کد"} + + - goBack()} - > - goBack()} > - {"بازگشت به مرحله قبل و اصلاح شماره"} - - - - )} - - + + {"بازگشت به مرحله قبل و اصلاح شماره"} + + + + )} + + + ); }