- more!
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user