Remove deprecated commonjs imports and exports

This commit is contained in:
Chi Vinh Le
2017-10-03 20:43:18 +07:00
parent e99b79687f
commit 7ea05e699e
32 changed files with 137 additions and 444 deletions
@@ -1,6 +1,13 @@
import ModTag from '../components/ModTag';
import {withTags} from 'plugin-api/beta/client/hocs';
import {gql} from 'react-apollo';
import {withTags, connect} from 'plugin-api/beta/client/hocs';
import {gql, compose} from 'react-apollo';
import {bindActionCreators} from 'redux';
import {notify} from 'plugin-api/beta/client/actions/notification';
const mapDispatchToProps = (dispatch) =>
bindActionCreators({
notify,
}, dispatch);
const fragments = {
comment: gql`
@@ -11,6 +18,10 @@ const fragments = {
}
`
};
const enhance = compose(
withTags('featured', {fragments}),
connect(null, mapDispatchToProps),
);
export default withTags('featured', {fragments})(ModTag);
export default enhance(ModTag);
@@ -4,7 +4,7 @@ import {compose, gql} from 'react-apollo';
import TabPane from '../components/TabPane';
import {withFragments, connect} from 'plugin-api/beta/client/hocs';
import Comment from '../containers/Comment';
import {addNotification} from 'plugin-api/beta/client/actions/notification';
import {notify} from 'plugin-api/beta/client/actions/notification';
import {viewComment} from 'coral-embed-stream/src/actions/stream';
import {appendNewNodes, getDefinitionName} from 'plugin-api/beta/client/utils';
import update from 'immutability-helper';
@@ -81,7 +81,7 @@ const LOAD_MORE_QUERY = gql`
const mapDispatchToProps = (dispatch) =>
bindActionCreators({
viewComment,
addNotification,
notify,
}, dispatch);
const enhance = compose(