From d237df638931d4cfbd5d32fc768d43aeea821689 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Fri, 14 Sep 2018 16:43:27 +0300 Subject: [PATCH] Fix timeout --- client/src/components/Toasts/Toast.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() {