2016-11-10 14:26:24 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import ErrorComponent from './error-component';
|
2021-01-06 21:59:47 +01:00
|
|
|
import { muteError } from '../../store/error/actions';
|
2016-11-10 14:26:24 +01:00
|
|
|
|
|
|
|
const mapDispatchToProps = {
|
|
|
|
muteError,
|
|
|
|
};
|
|
|
|
|
2021-04-20 19:13:31 +02:00
|
|
|
const mapStateToProps = state => {
|
|
|
|
return {
|
|
|
|
errors: state.error
|
2018-08-15 18:51:34 +02:00
|
|
|
.get('list')
|
|
|
|
.toArray()
|
2021-04-20 19:13:31 +02:00
|
|
|
.reverse()
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
2016-11-10 14:26:24 +01:00
|
|
|
|
2020-04-18 22:06:49 +02:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ErrorComponent);
|