mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 21:06:01 +08:00
Port plugins
This commit is contained in:
@@ -9,11 +9,7 @@ import withFragments from 'coral-framework/hocs/withFragments';
|
||||
import withMutation from 'coral-framework/hocs/withMutation';
|
||||
import { notify } from 'coral-framework/actions/notification';
|
||||
import { capitalize } from 'coral-framework/helpers/strings';
|
||||
import {
|
||||
getMyActionSummary,
|
||||
getTotalActionCount,
|
||||
getErrorMessages,
|
||||
} from 'coral-framework/utils';
|
||||
import { getMyActionSummary, getTotalActionCount } from 'coral-framework/utils';
|
||||
import hoistStatics from 'recompose/hoistStatics';
|
||||
import * as PropTypes from 'prop-types';
|
||||
import { getDefinitionName } from '../utils';
|
||||
@@ -282,7 +278,6 @@ export default (reaction, options = {}) =>
|
||||
})
|
||||
.catch(err => {
|
||||
this.duringMutation = false;
|
||||
this.props.notify('error', getErrorMessages(err));
|
||||
throw err;
|
||||
});
|
||||
};
|
||||
@@ -307,7 +302,6 @@ export default (reaction, options = {}) =>
|
||||
})
|
||||
.catch(err => {
|
||||
this.duringMutation = false;
|
||||
this.props.notify('error', getErrorMessages(err));
|
||||
throw err;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ 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 { getErrorMessages, isTagged } from 'coral-framework/utils';
|
||||
import { isTagged } from 'coral-framework/utils';
|
||||
import hoistStatics from 'recompose/hoistStatics';
|
||||
import { getDefinitionName } from '../utils';
|
||||
|
||||
@@ -38,7 +38,7 @@ export default (tag, options = {}) =>
|
||||
loading = false;
|
||||
|
||||
postTag = () => {
|
||||
const { comment, asset, notify } = this.props;
|
||||
const { comment, asset } = this.props;
|
||||
|
||||
if (this.loading) {
|
||||
return;
|
||||
@@ -59,13 +59,12 @@ export default (tag, options = {}) =>
|
||||
})
|
||||
.catch(err => {
|
||||
this.loading = false;
|
||||
notify('error', getErrorMessages(err));
|
||||
throw err;
|
||||
});
|
||||
};
|
||||
|
||||
deleteTag = () => {
|
||||
const { comment, asset, notify } = this.props;
|
||||
const { comment, asset } = this.props;
|
||||
|
||||
if (this.loading) {
|
||||
return;
|
||||
@@ -84,7 +83,6 @@ export default (tag, options = {}) =>
|
||||
})
|
||||
.catch(err => {
|
||||
this.loading = false;
|
||||
notify('error', getErrorMessages(err));
|
||||
throw err;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user