mirror of
https://github.com/wassname/talk.git
synced 2026-08-14 12:50:17 +08:00
Remove deprecated commonjs imports and exports
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
"es2015"
|
||||
],
|
||||
"plugins": [
|
||||
"add-module-exports",
|
||||
"transform-class-properties",
|
||||
"transform-decorators-legacy",
|
||||
"transform-object-assign",
|
||||
"transform-object-rest-spread",
|
||||
"transform-async-to-generator",
|
||||
"transform-react-jsx"
|
||||
]
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
||||
import styles from './ModTag.css';
|
||||
import {t} from 'plugin-api/beta/client/services';
|
||||
import {Icon} from 'plugin-api/beta/client/components/ui';
|
||||
import * as notification from 'coral-admin/src/services/notification';
|
||||
import {getErrorMessages} from 'plugin-api/beta/client/utils';
|
||||
|
||||
export default class ModTag extends React.Component {
|
||||
constructor() {
|
||||
@@ -32,10 +32,10 @@ export default class ModTag extends React.Component {
|
||||
postTag = async () => {
|
||||
try {
|
||||
await this.props.postTag();
|
||||
notification.success(t('talk-plugin-featured-comments.notify_self_featured', this.props.comment.user.username));
|
||||
this.props.notify('success', t('talk-plugin-featured-comments.notify_self_featured', this.props.comment.user.username));
|
||||
}
|
||||
catch(err) {
|
||||
notification.showMutationErrors(err);
|
||||
this.props.notify('error', getErrorMessages(err));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import Comment from '../containers/Comment';
|
||||
import LoadMore from './LoadMore';
|
||||
import {forEachError} from 'plugin-api/beta/client/utils';
|
||||
import {getErrorMessages} from 'plugin-api/beta/client/utils';
|
||||
|
||||
class TabPane extends React.Component {
|
||||
state = {
|
||||
@@ -16,7 +16,7 @@ class TabPane extends React.Component {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({loadingState: 'error'});
|
||||
forEachError(error, ({msg}) => {this.props.addNotification('error', msg);});
|
||||
this.props.notify('error', getErrorMessages(error));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user