Fix eslint warnings.

master
Tom Hacohen 5 years ago
parent ff47e38845
commit ba8d899d5d

@ -205,9 +205,13 @@ class ContactEdit extends React.PureComponent<PropsType> {
if ((this.props.collections !== nextProps.collections) || if ((this.props.collections !== nextProps.collections) ||
(this.props.initialCollection !== nextProps.initialCollection)) { (this.props.initialCollection !== nextProps.initialCollection)) {
if (nextProps.initialCollection) { if (nextProps.initialCollection) {
this.state.journalUid = nextProps.initialCollection; this.setState({
journalUid: nextProps.initialCollection,
});
} else if (nextProps.collections[0]) { } else if (nextProps.collections[0]) {
this.state.journalUid = nextProps.collections[0].uid; this.setState({
journalUid: nextProps.collections[0].uid,
});
} }
} }
} }

@ -118,9 +118,13 @@ class EventEdit extends React.PureComponent<PropsType> {
if ((this.props.collections !== nextProps.collections) || if ((this.props.collections !== nextProps.collections) ||
(this.props.initialCollection !== nextProps.initialCollection)) { (this.props.initialCollection !== nextProps.initialCollection)) {
if (nextProps.initialCollection) { if (nextProps.initialCollection) {
this.state.journalUid = nextProps.initialCollection; this.setState({
journalUid: nextProps.initialCollection,
});
} else if (nextProps.collections[0]) { } else if (nextProps.collections[0]) {
this.state.journalUid = nextProps.collections[0].uid; this.setState({
journalUid: nextProps.collections[0].uid,
});
} }
} }
} }

@ -106,9 +106,13 @@ class TaskEdit extends React.PureComponent<PropsType> {
if ((this.props.collections !== nextProps.collections) || if ((this.props.collections !== nextProps.collections) ||
(this.props.initialCollection !== nextProps.initialCollection)) { (this.props.initialCollection !== nextProps.initialCollection)) {
if (nextProps.initialCollection) { if (nextProps.initialCollection) {
this.state.journalUid = nextProps.initialCollection; this.setState({
journalUid: nextProps.initialCollection,
});
} else if (nextProps.collections[0]) { } else if (nextProps.collections[0]) {
this.state.journalUid = nextProps.collections[0].uid; this.setState({
journalUid: nextProps.collections[0].uid,
});
} }
} }
} }

@ -1,8 +1,10 @@
import * as React from 'react'; import * as React from 'react';
import { pure } from 'recompose'; import { pure } from 'recompose';
export const ExternalLink = pure((props: any) => ( export const ExternalLink = pure(({children, ...props}: any) => (
<a target="_blank" rel="noopener" {...props} /> <a target="_blank" rel="noopener" {...props}>
{children}
</a>
)); ));
export default ExternalLink; export default ExternalLink;

Loading…
Cancel
Save