register
This commit is contained in:
@@ -5,7 +5,6 @@ import * as Yup from 'yup'
|
|||||||
import { useAuthStore } from '../store/AuthStore'
|
import { useAuthStore } from '../store/AuthStore'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Input from '../../../components/Input'
|
import Input from '../../../components/Input'
|
||||||
import DatePickerComponent from '../../../components/DatePicker'
|
|
||||||
import Button from '../../../components/Button'
|
import Button from '../../../components/Button'
|
||||||
import { useRegister } from '../hooks/useAuthData'
|
import { useRegister } from '../hooks/useAuthData'
|
||||||
import { ErrorType } from '../../../helpers/types'
|
import { ErrorType } from '../../../helpers/types'
|
||||||
@@ -24,9 +23,7 @@ const RegisterStep2: FC = () => {
|
|||||||
initialValues: {
|
initialValues: {
|
||||||
firstName: '',
|
firstName: '',
|
||||||
lastName: '',
|
lastName: '',
|
||||||
birthDate: '',
|
|
||||||
code: 0,
|
code: 0,
|
||||||
nationalCode: '',
|
|
||||||
password: '',
|
password: '',
|
||||||
phone: phone,
|
phone: phone,
|
||||||
},
|
},
|
||||||
@@ -35,12 +32,8 @@ const RegisterStep2: FC = () => {
|
|||||||
.required(t('errors.required')),
|
.required(t('errors.required')),
|
||||||
lastName: Yup.string()
|
lastName: Yup.string()
|
||||||
.required(t('errors.required')),
|
.required(t('errors.required')),
|
||||||
birthDate: Yup.string()
|
|
||||||
.required(t('errors.required')),
|
|
||||||
code: Yup.number()
|
code: Yup.number()
|
||||||
.required(t('errors.required')),
|
.required(t('errors.required')),
|
||||||
nationalCode: Yup.string()
|
|
||||||
.required(t('errors.required')),
|
|
||||||
password: Yup.string()
|
password: Yup.string()
|
||||||
.required(t('errors.required')),
|
.required(t('errors.required')),
|
||||||
phone: Yup.string()
|
phone: Yup.string()
|
||||||
@@ -86,22 +79,22 @@ const RegisterStep2: FC = () => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className='mt-4 min-w-full rowTwoInput'>
|
{/* <div className='mt-4 min-w-full rowTwoInput'>
|
||||||
<DatePickerComponent
|
<DatePickerComponent
|
||||||
label={t('auth.dateofbirth')}
|
label={t('auth.dateofbirth')}
|
||||||
onChange={(date: string) => formik.setFieldValue('birthDate', date)}
|
onChange={(date: string) => formik.setFieldValue('birthDate', date)}
|
||||||
placeholder={t('auth.select_date')}
|
placeholder={t('auth.select_date')}
|
||||||
error_text={formik.touched.birthDate && formik.errors.birthDate ? formik.errors.birthDate : ''}
|
error_text={formik.touched.birthDate && formik.errors.birthDate ? formik.errors.birthDate : ''}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
label={t('auth.national_code')}
|
label={t('auth.national_code')}
|
||||||
placeholder={t('auth.national_code_enter')}
|
placeholder={t('auth.national_code_enter')}
|
||||||
name='nationalCode'
|
name='nationalCode'
|
||||||
onChange={formik.handleChange}
|
onChange={formik.handleChange}
|
||||||
error_text={formik.touched.nationalCode && formik.errors.nationalCode ? formik.errors.nationalCode : ''}
|
error_text={formik.touched.nationalCode && formik.errors.nationalCode ? formik.errors.nationalCode : ''}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
<div className='mt-4 rowTwoInput'>
|
<div className='mt-4 rowTwoInput'>
|
||||||
<Input
|
<Input
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ export type RegisterType = {
|
|||||||
phone: string;
|
phone: string;
|
||||||
firstName: string;
|
firstName: string;
|
||||||
lastName: string;
|
lastName: string;
|
||||||
birthDate: string;
|
|
||||||
nationalCode: string;
|
|
||||||
password: string;
|
password: string;
|
||||||
code: number;
|
code: number;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user