|
|
|
@ -4,7 +4,8 @@ import Input from "../../../components/Input"; |
|
|
|
|
import Button from "../../../components/Button"; |
|
|
|
|
import Timer from "../../../components/Timer"; |
|
|
|
|
import onInput from "../../../utils/onInput"; |
|
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
|
import Loading from "../../../components/Loading"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { connect } from "react-redux"; |
|
|
|
|
import { user, publicApi } from "../../../redux/actions"; |
|
|
|
@ -19,9 +20,10 @@ function SignUp({ |
|
|
|
|
theme, |
|
|
|
|
headerOptions, |
|
|
|
|
setHeaderOptions, |
|
|
|
|
loading, |
|
|
|
|
}) { |
|
|
|
|
const [level, setLevel] = useState("phonenumber"); |
|
|
|
|
const [signUpFields, setSignUpFiels] = useState({});
|
|
|
|
|
const [signUpFields, setSignUpFiels] = useState({}); |
|
|
|
|
const [error, setError] = useState(""); |
|
|
|
|
const [resend, setResend] = useState(false); |
|
|
|
|
const navigate = useNavigate(); |
|
|
|
@ -195,7 +197,7 @@ function SignUp({ |
|
|
|
|
inputMode="numeric" |
|
|
|
|
style={{ direction: "ltr" }} |
|
|
|
|
name="otp1" |
|
|
|
|
className="bg-grayF9 outline-none rounded-md p-4 w-16 text-sm lg:text-lg text-center text-blueC0 mx-1" |
|
|
|
|
className="bg-grayF9 dark:bg-opacity-10 outline-none rounded-md p-4 w-16 text-2xl font-bold lg:text-lg text-center text-blueC0 mx-1" |
|
|
|
|
onChange={(e) => |
|
|
|
|
onChange( |
|
|
|
|
e.target.name, |
|
|
|
@ -209,7 +211,7 @@ function SignUp({ |
|
|
|
|
inputMode="numeric" |
|
|
|
|
style={{ direction: "ltr" }} |
|
|
|
|
name="otp2" |
|
|
|
|
className="bg-grayF9 outline-none rounded-md p-4 w-16 text-sm lg:text-lg text-center text-blueC0 mx-1" |
|
|
|
|
className="bg-grayF9 dark:bg-opacity-10 outline-none rounded-md p-4 w-16 text-2xl font-bold lg:text-lg text-center text-blueC0 mx-1" |
|
|
|
|
onChange={(e) => |
|
|
|
|
onChange( |
|
|
|
|
e.target.name, |
|
|
|
@ -223,7 +225,7 @@ function SignUp({ |
|
|
|
|
inputMode="numeric" |
|
|
|
|
style={{ direction: "ltr" }} |
|
|
|
|
name="otp3" |
|
|
|
|
className="bg-grayF9 outline-none rounded-md p-4 w-16 text-sm lg:text-lg text-center text-blueC0 mx-1" |
|
|
|
|
className="bg-grayF9 dark:bg-opacity-10 outline-none rounded-md p-4 w-16 text-2xl font-bold lg:text-lg text-center text-blueC0 mx-1" |
|
|
|
|
onChange={(e) => |
|
|
|
|
onChange( |
|
|
|
|
e.target.name, |
|
|
|
@ -237,11 +239,13 @@ function SignUp({ |
|
|
|
|
inputMode="numeric" |
|
|
|
|
style={{ direction: "ltr" }} |
|
|
|
|
name="otp4" |
|
|
|
|
className="bg-grayF9 outline-none rounded-md p-4 w-16 text-sm lg:text-lg text-center text-blueC0 mx-1" |
|
|
|
|
className="bg-grayF9 dark:bg-opacity-10 outline-none rounded-md p-4 w-16 text-2xl font-bold lg:text-lg text-center text-blueC0 mx-1" |
|
|
|
|
onChange={(e) => |
|
|
|
|
onChange( |
|
|
|
|
e.target.name, |
|
|
|
|
(e.target.value = onInput.englishAndNumberWithoutSpace(e.target.value)) |
|
|
|
|
(e.target.value = onInput.englishAndNumberWithoutSpace( |
|
|
|
|
e.target.value |
|
|
|
|
)) |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
maxlength="1" |
|
|
|
@ -250,7 +254,8 @@ function SignUp({ |
|
|
|
|
</div> |
|
|
|
|
<br /> |
|
|
|
|
<Button |
|
|
|
|
title="ادامه فرایند خرید" |
|
|
|
|
title="ثبت نام" |
|
|
|
|
loading={loading} |
|
|
|
|
backgroundColor="bg-blueC0" |
|
|
|
|
border={{ color: "#196EC055", width: "0px" }} |
|
|
|
|
width="100%" |
|
|
|
@ -260,7 +265,7 @@ function SignUp({ |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
<div className="mt-10 flex flex-row text-center w-full justify-center"> |
|
|
|
|
<div className="text-xs text-gray1 lg:text-sm"> |
|
|
|
|
<div className="text-xs text-gray1 dark:text-gray-200 lg:text-sm"> |
|
|
|
|
شماره خود را اشتباه وارد کردید؟{" "} |
|
|
|
|
<button |
|
|
|
|
className="bg-transparent border-none text-greenBA font-medium" |
|
|
|
@ -277,7 +282,8 @@ function SignUp({ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
|
loginFlag : state.user.status, |
|
|
|
|
loginFlag: state.user.status, |
|
|
|
|
loading: state.user.loading, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
@ -286,7 +292,4 @@ const mapDispatchToProps = { |
|
|
|
|
setHeaderOptions: publicApi.setHeaderOptions, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default connect( |
|
|
|
|
mapStateToProps, |
|
|
|
|
mapDispatchToProps |
|
|
|
|
)(SignUp); |
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SignUp); |
|
|
|
|