import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Trans, withNamespaces } from 'react-i18next'; class Toast extends Component { componentDidMount() { const timeout = this.props.type === 'error' ? 30000 : 5000; setTimeout(() => { this.props.removeToast(this.props.id); }, timeout); } shouldComponentUpdate() { return false; } render() { return (