25 lines
549 B
JavaScript
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)
|