| fetchLogin, | fetchLogin, | ||||
| } from "../../store/actions/login/loginActions"; | } from "../../store/actions/login/loginActions"; | ||||
| import { selectLoginError } from "../../store/selectors/loginSelectors"; | import { selectLoginError } from "../../store/selectors/loginSelectors"; | ||||
| import { HOME_PAGE, ADMIN_HOME_PAGE } from "../../constants/pages"; | |||||
| import { HOME_PAGE, ADMIN_HOME_PAGE, LOGIN_PAGE } from "../../constants/pages"; | |||||
| import { ReactComponent as Logo } from "../../assets/images/svg/logo-vertical.svg"; | import { ReactComponent as Logo } from "../../assets/images/svg/logo-vertical.svg"; | ||||
| // import { ReactComponent as LogoAdmin } from "../../assets/images/svg/logo-vertical-admin.svg"; | // import { ReactComponent as LogoAdmin } from "../../assets/images/svg/logo-vertical-admin.svg"; | ||||
| import { | import { | ||||
| // Api response callback function on error | // Api response callback function on error | ||||
| const handleApiResponseError = () => { | const handleApiResponseError = () => { | ||||
| setPasswordReseted(true); | setPasswordReseted(true); | ||||
| history.push({ | |||||
| pathname: LOGIN_PAGE, | |||||
| state: { | |||||
| from: history.location.pathname, | |||||
| }, | |||||
| }); | |||||
| }; | }; | ||||
| // Checks if form is valid, and send it if it is valid | // Checks if form is valid, and send it if it is valid |