mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
Remove deprecated commonjs imports and exports
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user