Merge branch 'release/v1.22.3'

This commit is contained in:
AmirHossein Mahmoodi
2023-12-02 10:23:14 +03:30
5 changed files with 20 additions and 4 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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}

View 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;

View File

@@ -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"