mirror of
https://github.com/minio/minio.git
synced 2025-02-04 10:26:01 -05:00
clear errors of previous failed login attempts (#7516)
When the first login attempt is failed(due to incorrect secretkey) and the next attempt is successful. Error message shown for the previous attempts should go away. Fixes #7514
This commit is contained in:
parent
d2f42d830f
commit
3efcd6fa46
@ -48,7 +48,7 @@ export class Login extends React.Component {
|
|||||||
|
|
||||||
handleSubmit(event) {
|
handleSubmit(event) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
const { showAlert, history } = this.props
|
const { showAlert, clearAlert, history } = this.props
|
||||||
let message = ""
|
let message = ""
|
||||||
if (this.state.accessKey === "") {
|
if (this.state.accessKey === "") {
|
||||||
message = "Access Key cannot be empty"
|
message = "Access Key cannot be empty"
|
||||||
@ -66,6 +66,9 @@ export class Login extends React.Component {
|
|||||||
password: this.state.secretKey
|
password: this.state.secretKey
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
// Clear alerts from previous login attempts
|
||||||
|
clearAlert()
|
||||||
|
|
||||||
history.push("/")
|
history.push("/")
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
@ -145,4 +148,7 @@ const mapDispatchToProps = dispatch => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(state => state, mapDispatchToProps)(Login)
|
export default connect(
|
||||||
|
state => state,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(Login)
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user