lunch/js/containers/LunchAppContainer.js
2017-01-10 08:46:34 -05:00

25 lines
549 B
JavaScript

var connect = require('react-redux').connect;
var UserActions = require('../actions/UserActions');
var GroupActions = require('../actions/GroupActions');
var LunchApp = require('../components/LunchApp');
function mapStateToProps(state) {
return {
user: state.user
}
}
function mapDispatchToProps(dispatch) {
return {
tryResumingSession: function() {dispatch(UserActions.tryResumingSession())},
fetchGroups: function() {dispatch(GroupActions.fetchAll())}
}
}
module.exports = connect(
mapStateToProps,
mapDispatchToProps
)(LunchApp)