Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
- redirect handler for the error page button #1878
Browse files Browse the repository at this point in the history
  • Loading branch information
siemiatj committed Aug 8, 2018
1 parent 5eb6a73 commit 3fe57b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/app/PasswordRecovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import counterpart from 'counterpart';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import classnames from 'classnames';
import { push } from 'react-router-redux';

import {
resetPasswordRequest,
Expand Down Expand Up @@ -68,6 +69,11 @@ class PasswordRecovery extends Component {
});
};

redirectToLogin = () => {
const { dispatch } = this.props;
dispatch(push('/login'));
};

handleKeyPress = e => {
if (e.key === 'Enter') {
this.form.submit();
Expand Down Expand Up @@ -261,6 +267,7 @@ class PasswordRecovery extends Component {
<button
className="btn btn-sm btn-block btn-meta-success"
type="button"
onClick={this.redirectToLogin}
>
{buttonMessage}
</button>
Expand Down

0 comments on commit 3fe57b5

Please sign in to comment.