chore(client): Move client app to /client
This commit is contained in:
committed by
mrugesh mohapatra
parent
0e4f588a1c
commit
e59ad6ebda
30
client/src/components/AppMountNotifier.js
Normal file
30
client/src/components/AppMountNotifier.js
Normal file
@@ -0,0 +1,30 @@
|
||||
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);
|
||||
|
||||
class AppMountNotifer extends Component {
|
||||
componentDidMount() {
|
||||
return this.props.appMount();
|
||||
}
|
||||
render() {
|
||||
return this.props.render();
|
||||
}
|
||||
}
|
||||
|
||||
AppMountNotifer.displayName = 'AppMountNotifier';
|
||||
AppMountNotifer.propTypes = {
|
||||
appMount: PropTypes.func.isRequired,
|
||||
render: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(AppMountNotifer);
|
Reference in New Issue
Block a user