This commit is contained in:
2019-07-24 00:53:01 -04:00
parent 434a1ded24
commit a9f4324f29
21 changed files with 345 additions and 100 deletions

19
app/containers/Events.js Normal file
View File

@@ -0,0 +1,19 @@
import { connect } from 'react-redux';
import { fetchEvents } from '../actions/events.js';
import { getEventsAsList } from '../selectors/events.js';
import Events from '../screens/Events.js';
const matchStateToProps = (state) => {
const events = getEventsAsList(state);
console.log('events:', events);
return { events };
};
const mapDispatchToProps = (dispatch) => ({
fetchEvents: () => dispatch(fetchEvents(dispatch)),
});
export default connect(matchStateToProps, mapDispatchToProps)(Events);