Fix eslint rules
[MAILPOET-1348]
This commit is contained in:
@@ -2,6 +2,7 @@ import React from 'react';
|
|||||||
import AutomaticEmailsBreadcrumb from 'newsletters/types/automatic_emails/breadcrumb.jsx';
|
import AutomaticEmailsBreadcrumb from 'newsletters/types/automatic_emails/breadcrumb.jsx';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import _ from 'underscore';
|
import _ from 'underscore';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
class AutomaticEmailEventsList extends React.Component {
|
class AutomaticEmailEventsList extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -21,7 +22,8 @@ class AutomaticEmailEventsList extends React.Component {
|
|||||||
|
|
||||||
if (this.email.premium) {
|
if (this.email.premium) {
|
||||||
action = (
|
action = (
|
||||||
<a href="?page=mailpoet-premium"
|
<a
|
||||||
|
href="?page=mailpoet-premium"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
{MailPoet.I18n.t('premiumFeatureLink')}
|
{MailPoet.I18n.t('premiumFeatureLink')}
|
||||||
@@ -31,7 +33,8 @@ class AutomaticEmailEventsList extends React.Component {
|
|||||||
const disabled = event.soon;
|
const disabled = event.soon;
|
||||||
|
|
||||||
action = (
|
action = (
|
||||||
<a className="button button-primary"
|
<a
|
||||||
|
className="button button-primary"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={!disabled ? this.eventsConfigurator.bind(null, event.slug) : null}
|
onClick={!disabled ? this.eventsConfigurator.bind(null, event.slug) : null}
|
||||||
>
|
>
|
||||||
@@ -91,4 +94,18 @@ class AutomaticEmailEventsList extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AutomaticEmailEventsList.propTypes = {
|
||||||
|
|
||||||
|
route: PropTypes.shape({
|
||||||
|
data: PropTypes.shape({
|
||||||
|
email: PropTypes.string.isRequired,
|
||||||
|
}).isRequired,
|
||||||
|
}).isRequired,
|
||||||
|
|
||||||
|
router: PropTypes.shape({
|
||||||
|
push: PropTypes.func.isRequired,
|
||||||
|
}).isRequired,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = AutomaticEmailEventsList;
|
module.exports = AutomaticEmailEventsList;
|
||||||
|
@@ -1,20 +1,9 @@
|
|||||||
define(
|
import React from 'react';
|
||||||
[
|
import MailPoet from 'mailpoet';
|
||||||
'underscore',
|
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
||||||
'react',
|
import _ from 'underscore';
|
||||||
'react-router',
|
import Scheduling from 'newsletters/types/notification/scheduling.jsx';
|
||||||
'mailpoet',
|
|
||||||
'newsletters/types/notification/scheduling.jsx',
|
|
||||||
'newsletters/breadcrumb.jsx',
|
|
||||||
],
|
|
||||||
(
|
|
||||||
_,
|
|
||||||
React,
|
|
||||||
Router,
|
|
||||||
MailPoet,
|
|
||||||
Scheduling,
|
|
||||||
Breadcrumb
|
|
||||||
) => {
|
|
||||||
const field = {
|
const field = {
|
||||||
name: 'options',
|
name: 'options',
|
||||||
type: 'reactComponent',
|
type: 'reactComponent',
|
||||||
@@ -91,6 +80,5 @@ define(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return NewsletterNotification;
|
module.exports = NewsletterNotification;
|
||||||
}
|
|
||||||
);
|
|
||||||
|
@@ -1,16 +1,7 @@
|
|||||||
define(
|
import React from 'react';
|
||||||
[
|
import MailPoet from 'mailpoet';
|
||||||
'react',
|
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
||||||
'react-router',
|
|
||||||
'mailpoet',
|
|
||||||
'newsletters/breadcrumb.jsx',
|
|
||||||
],
|
|
||||||
(
|
|
||||||
React,
|
|
||||||
Router,
|
|
||||||
MailPoet,
|
|
||||||
Breadcrumb
|
|
||||||
) => {
|
|
||||||
const NewsletterStandard = React.createClass({
|
const NewsletterStandard = React.createClass({
|
||||||
contextTypes: {
|
contextTypes: {
|
||||||
router: React.PropTypes.object.isRequired,
|
router: React.PropTypes.object.isRequired,
|
||||||
@@ -48,6 +39,5 @@ define(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return NewsletterStandard;
|
module.exports = NewsletterStandard;
|
||||||
}
|
|
||||||
);
|
|
||||||
|
Reference in New Issue
Block a user