diff --git a/client/src/components/Toasts/Toast.js b/client/src/components/Toasts/Toast.js index 14cf09d4..9d85f048 100644 --- a/client/src/components/Toasts/Toast.js +++ b/client/src/components/Toasts/Toast.js @@ -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() {