Fix react/no-this-in-sfc eslint rule
This commit is contained in:
@@ -34,8 +34,7 @@
|
|||||||
"react/jsx-closing-tag-location": 0, // todo
|
"react/jsx-closing-tag-location": 0, // todo
|
||||||
"react/require-default-props": 0, // todo
|
"react/require-default-props": 0, // todo
|
||||||
"react/jsx-no-target-blank": 0, // todo
|
"react/jsx-no-target-blank": 0, // todo
|
||||||
"react/no-unused-state": 0, // todo
|
"react/no-unused-state": 0 // todo
|
||||||
"react/no-this-in-sfc": 0 // todo
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -93,8 +93,8 @@ const QueueMixin = {
|
|||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const resumeSendingClick = _.partial(this.resumeSending, newsletter);
|
const resumeSendingClick = _.partial(QueueMixin.resumeSending, newsletter);
|
||||||
const pauseSendingClick = _.partial(this.pauseSending, newsletter);
|
const pauseSendingClick = _.partial(QueueMixin.pauseSending, newsletter);
|
||||||
label = (
|
label = (
|
||||||
<span>
|
<span>
|
||||||
{ parseInt(newsletter.queue.count_processed, 10).toLocaleString() }
|
{ parseInt(newsletter.queue.count_processed, 10).toLocaleString() }
|
||||||
@@ -180,7 +180,7 @@ const StatisticsMixin = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
Hooks.addFilter('mailpoet_newsletters_listing_stats_before', this.addStatsCTALink);
|
Hooks.addFilter('mailpoet_newsletters_listing_stats_before', StatisticsMixin.addStatsCTALink);
|
||||||
params = Hooks.applyFilters('mailpoet_newsletters_listing_stats_before', params, newsletter);
|
params = Hooks.applyFilters('mailpoet_newsletters_listing_stats_before', params, newsletter);
|
||||||
|
|
||||||
// welcome emails provide explicit total_sent value
|
// welcome emails provide explicit total_sent value
|
||||||
@@ -391,14 +391,14 @@ const StatisticsMixin = {
|
|||||||
const MailerMixin = {
|
const MailerMixin = {
|
||||||
checkMailerStatus: function checkMailerStatus(state) {
|
checkMailerStatus: function checkMailerStatus(state) {
|
||||||
if (state.meta.mta_log.error && state.meta.mta_log.status === 'paused') {
|
if (state.meta.mta_log.error && state.meta.mta_log.status === 'paused') {
|
||||||
const errorType = this.getMailerErrorType(state);
|
const errorType = MailerMixin.getMailerErrorType(state);
|
||||||
MailPoet.Notice[errorType](
|
MailPoet.Notice[errorType](
|
||||||
'',
|
'',
|
||||||
{ static: true, id: 'mailpoet_mailer_error' }
|
{ static: true, id: 'mailpoet_mailer_error' }
|
||||||
);
|
);
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
this.getMailerError(state),
|
MailerMixin.getMailerError(state),
|
||||||
jQuery('[data-id="mailpoet_mailer_error"]')[0]
|
jQuery('[data-id="mailpoet_mailer_error"]')[0]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -444,7 +444,7 @@ const MailerMixin = {
|
|||||||
<a
|
<a
|
||||||
href="javascript:;"
|
href="javascript:;"
|
||||||
className="button"
|
className="button"
|
||||||
onClick={this.resumeMailerSending}
|
onClick={MailerMixin.resumeMailerSending}
|
||||||
>
|
>
|
||||||
{ MailPoet.I18n.t('mailerResumeSendingButton') }
|
{ MailPoet.I18n.t('mailerResumeSendingButton') }
|
||||||
</a>
|
</a>
|
||||||
|
Reference in New Issue
Block a user