mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-02-16 18:09:47 +03:00
Fix timeout
This commit is contained in:
parent
22a5abb7b8
commit
d237df6389
1 changed files with 2 additions and 2 deletions
|
@ -3,11 +3,11 @@ import PropTypes from 'prop-types';
|
|||
|
||||
class Toast extends Component {
|
||||
componentDidMount() {
|
||||
const timeoutTime = this.props.type === 'error' ? 30000 : 5000;
|
||||
const timeout = this.props.type === 'error' ? 30000 : 5000;
|
||||
|
||||
setTimeout(() => {
|
||||
this.props.removeToast(this.props.id);
|
||||
}, timeoutTime);
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
shouldComponentUpdate() {
|
||||
|
|
Loading…
Add table
Reference in a new issue