diff --git a/src/pages/auth/components/LoginStep2.tsx b/src/pages/auth/components/LoginStep2.tsx index 65d737e..6c4ae41 100644 --- a/src/pages/auth/components/LoginStep2.tsx +++ b/src/pages/auth/components/LoginStep2.tsx @@ -8,6 +8,7 @@ import Button from '../../../components/Button' import OTPInput from 'react-otp-input' import { useCountDown } from '../../../hooks/useCountDown' import ArrowLeftIcon from '../../../assets/images/arrow-left.svg' +import { Pages } from '../../../config/Pages' const LoginStep2: FC = () => { @@ -18,7 +19,7 @@ const LoginStep2: FC = () => { const formik = useFormik({ initialValues: { - phone_email: '', + phone_email: phone, }, validationSchema: Yup.object({ phone_email: Yup.string() @@ -26,6 +27,8 @@ const LoginStep2: FC = () => { }), onSubmit(values) { setPhone(values.phone_email) + localStorage.setItem(import.meta.env.VITE_TOKEN_NAME, 'token') + window.location.href = Pages.dashboard }, }) diff --git a/src/pages/auth/components/LoginStep3.tsx b/src/pages/auth/components/LoginStep3.tsx index 63fbdf2..041f776 100644 --- a/src/pages/auth/components/LoginStep3.tsx +++ b/src/pages/auth/components/LoginStep3.tsx @@ -25,7 +25,9 @@ const LoginStep3: FC = () => { .required(t('errors.required')) }), onSubmit(values) { - console.log(values); + console.log(values) + localStorage.setItem(import.meta.env.VITE_TOKEN_NAME, 'token') + window.location.href = Pages.dashboard }, })