This commit is contained in:
Mike Fitzpatrick
2019-08-06 14:58:01 -04:00
parent b8ddc54b99
commit 637794ebcd
7 changed files with 58 additions and 43 deletions

View File

@@ -9,6 +9,10 @@ import Event from './Event.js';
const matchStateToProps = (state) => {
const event = getActiveEvent(state) || getDefaultEvent(state) || new EventRecord();
if (!event) {
return {};
}
return {
description: event.get('description'),
endTime: event.get('endTime'),
@@ -27,8 +31,6 @@ const matchStateToProps = (state) => {
};
};
const mapDispatchToProps = (dispatch) => ({
fetchEvents: () => dispatch(fetchEvents()),
});
const mapDispatchToProps = (dispatch) => ({});
export default connect(matchStateToProps, mapDispatchToProps)(Event);