Commit cfc5dff3 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

token expired

See merge request !1406
parents 0a799d7b f2c40ce5
...@@ -75,7 +75,18 @@ export default class SubHolding extends Component { ...@@ -75,7 +75,18 @@ export default class SubHolding extends Component {
this.setState({ userCompany: response.data.data.company }, () => { this.setState({ userCompany: response.data.data.company }, () => {
this.getCompanyActive() this.getCompanyActive()
}) })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
} }
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error'})
} }
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment