1
0
Fork 0
lunch/js/containers/LunchAppContainer.js

25 lines
549 B
JavaScript
Raw Normal View History

2016-12-22 21:22:47 -05:00
var connect = require('react-redux').connect;
var UserActions = require('../actions/UserActions');
2017-01-10 08:08:45 -05:00
var GroupActions = require('../actions/GroupActions');
2016-12-22 21:22:47 -05:00
var LunchApp = require('../components/LunchApp');
function mapStateToProps(state) {
return {
user: state.user
}
}
function mapDispatchToProps(dispatch) {
return {
tryResumingSession: function() {dispatch(UserActions.tryResumingSession())},
2017-01-10 08:08:45 -05:00
fetchGroups: function() {dispatch(GroupActions.fetchAll())}
2016-12-22 21:22:47 -05:00
}
}
module.exports = connect(
mapStateToProps,
mapDispatchToProps
)(LunchApp)