mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -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) {
|
||||
event.preventDefault()
|
||||
const { showAlert, history } = this.props
|
||||
const { showAlert, clearAlert, history } = this.props
|
||||
let message = ""
|
||||
if (this.state.accessKey === "") {
|
||||
message = "Access Key cannot be empty"
|
||||
@ -66,6 +66,9 @@ export class Login extends React.Component {
|
||||
password: this.state.secretKey
|
||||
})
|
||||
.then(res => {
|
||||
// Clear alerts from previous login attempts
|
||||
clearAlert()
|
||||
|
||||
history.push("/")
|
||||
})
|
||||
.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…
Reference in New Issue
Block a user