Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX ESLint issues #201

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions client/src/components/ShareDraftContent/ShareDraftContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ShareDraftContent extends Component {
const { links: { generateLink } } = this.props;

return fetch(generateLink, { credentials: 'same-origin' })
.then(response => response.text())
.then((response) => response.text())
.then(
(response) => {
this.setState({
Expand All @@ -66,7 +66,7 @@ class ShareDraftContent extends Component {
},
() => {
this.setState({ error: true });
}
},
);
}

Expand Down Expand Up @@ -94,7 +94,7 @@ class ShareDraftContent extends Component {
<div className="alert alert-danger">
{i18n._t(
'ShareDraftContent.FETCH_ERROR',
'There was a problem generating the shareable link!'
'There was a problem generating the shareable link!',
)}
</div>
);
Expand All @@ -113,15 +113,17 @@ class ShareDraftContent extends Component {
<p>
{i18n._t(
'ShareDraftContent.DESCRIPTION',
'Anyone with this link can view the draft version of this page.'
)} {learnMore && <a
href={learnMore}
className="share-draft-content__learn-more"
target="_blank"
rel="noopener noreferrer"
>
{i18n._t('ShareDraftContent.LEARN_MORE', 'Learn more')}
</a>}
'Anyone with this link can view the draft version of this page.',
)} {learnMore &&
<a
href={learnMore}
className="share-draft-content__learn-more"
target="_blank"
rel="noopener noreferrer"
>
{i18n._t('ShareDraftContent.LEARN_MORE', 'Learn more')}
</a>
}
</p>
);
}
Expand Down Expand Up @@ -226,5 +228,5 @@ ShareDraftContent.defaultProps = {
export { ShareDraftContent as Component };

export default inject(
['PopoverField']
['PopoverField'],
)(ShareDraftContent);
4 changes: 2 additions & 2 deletions client/src/legacy/ShareDraftContentEntwine.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jQuery.entwine('ss', ($) => {
generateLink: this.data('url'),
learnMore: this.data('helpurl'),
}}
/>
/>,
);
},

Expand All @@ -44,6 +44,6 @@ jQuery.entwine('ss', ($) => {
root.unmount();
this.setReactRoot(null);
}
}
},
});
});