Route To Register Done

main
Pedram Keshavarzi 3 years ago
parent 600b04b4f9
commit 9fc4c07336
  1. 16
      src/view/LoginSignUp/index.js

@ -12,7 +12,7 @@ import VerificationInput from "../../components/verificationInput";
const LoginSignUp = ({ activeLogin }) => { const LoginSignUp = ({ activeLogin }) => {
const [steps, setSteps] = useState(0); const [steps, setSteps] = useState(0);
const [index, setIndex] = useState(1); const [index, setIndex] = useState(1);
const [register, setRegister] = useState(false);
const timeoutRef = useRef(null); const timeoutRef = useRef(null);
const focusHandler = (id) => { const focusHandler = (id) => {
@ -160,9 +160,13 @@ const LoginSignUp = ({ activeLogin }) => {
ورود ورود
</Link> </Link>
<Link <Link
to="/dashboard" to=""
className="Login-box-form-btn w-full h-12 rounded-lg border border-solid border-red52 text-red52 flex items-center justify-center mt-4" className="Login-box-form-btn w-full h-12 rounded-lg border border-solid border-red52 text-red52 flex items-center justify-center mt-4"
onClick={activeLogin} onClick={() => {
setSteps(1);
setRegister(true);
}}
> >
ثبت نام ثبت نام
</Link> </Link>
@ -208,11 +212,13 @@ const LoginSignUp = ({ activeLogin }) => {
<VerificationInput /> <VerificationInput />
</div> </div>
<Link <Link
to="/dashboard" to={register == true ? '/dashboard/register' : `/dashboard`}
className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4" className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4"
onClick={() => { onClick={() => {
activeLogin() activeLogin()
}} }}
> >
تایید تایید

Loading…
Cancel
Save