Merge branch 'release/v1.22.3'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard"
|
||||
NEXT_PUBLIC_API_VERSION = "1.18.2"
|
||||
NEXT_PUBLIC_API_VERSION = "1.22.3"
|
||||
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
|
||||
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import {useTranslations} from "next-intl";
|
||||
import * as Yup from "yup";
|
||||
import SvgLogin from "@/core/components/svgs/SvgLogin";
|
||||
import useRequest from "@/lib/app/hooks/useRequest";
|
||||
import AutoSubmit from "@/core/components/AutoSubmit";
|
||||
|
||||
const SendTokenComponent = ({
|
||||
PhoneNumber,
|
||||
@@ -111,6 +112,7 @@ const SendTokenComponent = ({
|
||||
: null
|
||||
}
|
||||
/>
|
||||
<AutoSubmit/>
|
||||
<Grid container>
|
||||
<Grid item xs={12}>
|
||||
<Button
|
||||
|
||||
@@ -12,6 +12,7 @@ import ResendToken from "@/core/components/ResendToken";
|
||||
import useUser from "@/lib/app/hooks/useUser";
|
||||
import SvgRegister from "@/core/components/svgs/SvgRegister";
|
||||
import useRequest from "@/lib/app/hooks/useRequest";
|
||||
import AutoSubmit from "@/core/components/AutoSubmit";
|
||||
|
||||
const UserRegisterComponent = ({
|
||||
PhoneNumber,
|
||||
@@ -109,7 +110,7 @@ const UserRegisterComponent = ({
|
||||
placeholder={t(
|
||||
"LoginPage.text_field_enter_your_verification_code"
|
||||
)}
|
||||
type={"text"}
|
||||
type={"number"}
|
||||
error={
|
||||
!!(props.touched.verification_code && props.errors.verification_code)
|
||||
}
|
||||
@@ -119,7 +120,9 @@ const UserRegisterComponent = ({
|
||||
? props.errors.verification_code
|
||||
: null
|
||||
}
|
||||
onChange={(e) => e.target.value.length <= 6 ? props.setFieldValue("verification_code", e.target.value) : ""}
|
||||
/>
|
||||
<AutoSubmit/>
|
||||
<ResendToken
|
||||
initialTimerValue={initialTimerValue}
|
||||
timer={timer}
|
||||
|
||||
13
src/core/components/AutoSubmit.jsx
Normal file
13
src/core/components/AutoSubmit.jsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import {useFormikContext} from "formik";
|
||||
import {useEffect} from "react";
|
||||
|
||||
const AutoSubmit = () => {
|
||||
const {values, submitForm} = useFormikContext()
|
||||
useEffect(() => {
|
||||
if (values.verification_code.length === 6) {
|
||||
submitForm();
|
||||
}
|
||||
}, [values, submitForm]);
|
||||
};
|
||||
|
||||
export default AutoSubmit;
|
||||
@@ -33,8 +33,6 @@ const GlobalHead = () => {
|
||||
sizes="180x180"
|
||||
href="/icons/maskable_icon_x192.png"
|
||||
/>
|
||||
<meta name="google" content="notranslate"/>
|
||||
<meta name="robots" content="noindex"/>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"
|
||||
|
||||
Reference in New Issue
Block a user