fix bug
This commit is contained in:
+1
-1
@@ -333,7 +333,7 @@
|
|||||||
"notification_announcement": "اعلانات و اطلاعیه ها",
|
"notification_announcement": "اعلانات و اطلاعیه ها",
|
||||||
"email": "ایمیل",
|
"email": "ایمیل",
|
||||||
"sms": "پیامک",
|
"sms": "پیامک",
|
||||||
"change_password": "تغییر رمز عبور",
|
"change_password": "تنظیم پسورد",
|
||||||
"current_password": "رمز عبور فعلی",
|
"current_password": "رمز عبور فعلی",
|
||||||
"new_password": "رمز عبور جدید",
|
"new_password": "رمز عبور جدید",
|
||||||
"reapeat_password": "تکرار رمز عبور",
|
"reapeat_password": "تکرار رمز عبور",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { FC } from 'react'
|
import { FC, useEffect } from 'react'
|
||||||
import LogoImage from '../../assets/images/logo.svg'
|
import LogoImage from '../../assets/images/logo.svg'
|
||||||
import LogoSmallImage from '../../assets/images/logo-small.svg'
|
import LogoSmallImage from '../../assets/images/logo-small.svg'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@@ -14,6 +14,11 @@ const Register: FC = () => {
|
|||||||
const { stepLogin } = useAuthStore()
|
const { stepLogin } = useAuthStore()
|
||||||
const { t } = useTranslation('global')
|
const { t } = useTranslation('global')
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
window.location.href = Pages.auth.login
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='w-full h-full flex justify-center lg:py-[75px] py-4 lg:items-center lg:px-10 px-4'>
|
<div className='w-full h-full flex justify-center lg:py-[75px] py-4 lg:items-center lg:px-10 px-4'>
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ const ChangePassword: FC = () => {
|
|||||||
|
|
||||||
const formik = useFormik<ChangePasswordType>({
|
const formik = useFormik<ChangePasswordType>({
|
||||||
initialValues: {
|
initialValues: {
|
||||||
password: '',
|
// password: '',
|
||||||
newPassword: '',
|
newPassword: '',
|
||||||
repeatPassword: ''
|
repeatPassword: ''
|
||||||
},
|
},
|
||||||
validationSchema: Yup.object({
|
validationSchema: Yup.object({
|
||||||
password: Yup.string()
|
// password: Yup.string()
|
||||||
.required(t('errors.required')),
|
// .required(t('errors.required')),
|
||||||
newPassword: Yup.string()
|
newPassword: Yup.string()
|
||||||
.required(t('errors.required')),
|
.required(t('errors.required')),
|
||||||
repeatPassword: Yup.string()
|
repeatPassword: Yup.string()
|
||||||
@@ -54,14 +54,14 @@ const ChangePassword: FC = () => {
|
|||||||
|
|
||||||
<div className='flex xl:flex-row flex-col xl:gap-10 gap-4'>
|
<div className='flex xl:flex-row flex-col xl:gap-10 gap-4'>
|
||||||
<div className='flex-1'>
|
<div className='flex-1'>
|
||||||
<Input
|
{/* <Input
|
||||||
type='password'
|
type='password'
|
||||||
className='mt-6'
|
className='mt-6'
|
||||||
placeholder={t('setting.current_password')}
|
placeholder={t('setting.current_password')}
|
||||||
name='password'
|
name='password'
|
||||||
onChange={formik.handleChange}
|
onChange={formik.handleChange}
|
||||||
error_text={formik.touched.password && formik.errors.password ? formik.errors.password : ''}
|
error_text={formik.touched.password && formik.errors.password ? formik.errors.password : ''}
|
||||||
/>
|
/> */}
|
||||||
<Input
|
<Input
|
||||||
type='password'
|
type='password'
|
||||||
className='mt-6'
|
className='mt-6'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export type UpdateSettingType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type ChangePasswordType = {
|
export type ChangePasswordType = {
|
||||||
password: string;
|
// password: string;
|
||||||
newPassword: string;
|
newPassword: string;
|
||||||
repeatPassword: string;
|
repeatPassword: string;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user