2018-08-30 15:27:53 +01:00
|
|
|
import { Component } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { bindActionCreators } from 'redux';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
|
|
import { appMount } from '../redux';
|
|
|
|
|
|
|
|
const mapStateToProps = () => ({});
|
|
|
|
const mapDispatchToProps = dispatch =>
|
|
|
|
bindActionCreators({ appMount }, dispatch);
|
|
|
|
|
2020-02-08 13:29:10 -05:00
|
|
|
class AppMountNotifier extends Component {
|
2018-08-30 15:27:53 +01:00
|
|
|
componentDidMount() {
|
|
|
|
return this.props.appMount();
|
|
|
|
}
|
|
|
|
render() {
|
|
|
|
return this.props.render();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-08 13:29:10 -05:00
|
|
|
AppMountNotifier.displayName = 'AppMountNotifier';
|
|
|
|
AppMountNotifier.propTypes = {
|
2018-08-30 15:27:53 +01:00
|
|
|
appMount: PropTypes.func.isRequired,
|
|
|
|
render: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
mapStateToProps,
|
|
|
|
mapDispatchToProps
|
2020-02-08 13:29:10 -05:00
|
|
|
)(AppMountNotifier);
|