| @@ -51,7 +51,7 @@ const AppRoutes = () => { | |||
| <Route exact path={BASE_PAGE} component={HomePage} /> | |||
| <AuthRoute exact path={LOGIN_PAGE} component={LoginPage} /> | |||
| <AuthRoute exact path={ADMIN_LOGIN_PAGE} component={AdminLoginPage} /> | |||
| <AuthRoute path={REGISTER_PAGE} component={Register} /> | |||
| <AuthRoute exact path={REGISTER_PAGE} component={Register} /> | |||
| <AuthRoute path={FORGOT_PASSWORD_MAIL_SENT} component={MailSent} /> | |||
| <AuthRoute path={FORGOT_PASSWORD_PAGE} component={ForgotPasswordPage} /> | |||
| <AuthRoute path={RESET_PASSWORD_PAGE} component={ResetPasswordPage} /> | |||
| @@ -96,11 +96,11 @@ const Register = () => { | |||
| if (currentStep !== 3) { | |||
| setCurrentStep((prevState) => prevState + 1); | |||
| } else { | |||
| if (!informations.image) { | |||
| setImageError(true); | |||
| } else { | |||
| // if (!informations.image) { | |||
| // setImageError(true); | |||
| // } else { | |||
| registerUser({ ...informations, ...values }); | |||
| } | |||
| // } | |||
| } | |||
| setInformations({ ...informations, ...values }); | |||
| }; | |||
| @@ -24,7 +24,9 @@ function* fetchRegisterUser({ payload }) { | |||
| const requestBody = new FormData(); | |||
| requestBody.append("email", payload.values.mail); | |||
| requestBody.append("password", payload.values.registerPassword); | |||
| requestBody.append("file", payload.values.image); | |||
| if (payload.values.image) { | |||
| requestBody.append("file", payload.values.image); | |||
| } | |||
| requestBody.append("company[name]", payload.values.nameOfFirm); | |||
| requestBody.append("company[PIB]", payload.values.PIB); | |||
| if (payload.values.phoneNumber.toString().length !== 0) | |||