import React from 'react' import PropTypes from 'prop-types' import MdClose from 'react-icons/lib/md/close' import styles from './GlobalError.scss' class GlobalError extends React.Component { componentDidUpdate(prevProps) { const { clearError, error } = this.props if (!prevProps.error && error) { setTimeout(clearError, 10000) } } render() { const { error, clearError } = this.props return (