mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
refactor: handles async for set state
This commit is contained in:
parent
98abac4dec
commit
44eed627df
@ -31,9 +31,9 @@ export default class Header extends React.Component {
|
||||
}
|
||||
|
||||
toggleLoginModal() {
|
||||
this.setState({
|
||||
showLogin: !this.state.showLogin
|
||||
});
|
||||
this.setState((prevState) => ({
|
||||
showLogin: !prevState.showLogin
|
||||
}));
|
||||
this.setState({loginError: null});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user