Don't require notify property

This commit is contained in:
Chi Vinh Le
2018-01-23 20:27:46 +01:00
parent 59cdc9fd5d
commit d15694041a
18 changed files with 13 additions and 101 deletions
+1 -6
View File
@@ -1,12 +1,10 @@
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { compose, gql } from 'react-apollo';
import { getDisplayName } from 'coral-framework/helpers/hoc';
import { capitalize } from 'coral-framework/helpers/strings';
import { withAddTag, withRemoveTag } from 'coral-framework/graphql/mutations';
import withFragments from 'coral-framework/hocs/withFragments';
import { notify } from 'coral-framework/actions/notification';
import { isTagged } from 'coral-framework/utils';
import hoistStatics from 'recompose/hoistStatics';
import { getDefinitionName } from '../utils';
@@ -112,9 +110,6 @@ export default (tag, options = {}) =>
user: state.auth.user,
});
const mapDispatchToProps = dispatch =>
bindActionCreators({ notify }, dispatch);
const enhance = compose(
withFragments({
...fragments,
@@ -144,7 +139,7 @@ export default (tag, options = {}) =>
}),
withAddTag,
withRemoveTag,
connect(mapStateToProps, mapDispatchToProps)
connect(mapStateToProps, null)
);
WithTags.displayName = `WithTags(${getDisplayName(WrappedComponent)})`;