Web.Client: Confirm: activateUser: added refreshing page

This commit is contained in:
Daniil Senkiv 2019-10-02 11:33:46 +03:00
parent 086870fd37
commit f0b20ed9bc

View File

@ -74,7 +74,7 @@ class Confirm extends React.PureComponent {
onSubmit = (e) => {
this.setState({ isLoading: true }, function () {
const { history, activateConfirmUser } = this.props;
const { activateConfirmUser } = this.props;
this.setState({ errorText: "" });
@ -113,7 +113,7 @@ class Confirm extends React.PureComponent {
};
activateConfirmUser(personalData, loginData, this.state.key, this.state.userId, EmployeeActivationStatus.Activated)
.then(() => history.push('/'))
.then(() => window.location.href = '/')
.catch(e => {
console.error("activate error", e);
this.setState({ errorText: e.message });