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) ||
(this.props.initialCollection !== nextProps.initialCollection)) {
if (nextProps.initialCollection) {
this.state.journalUid = nextProps.initialCollection;
this.setState({
journalUid: nextProps.initialCollection,
});
} 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) ||
(this.props.initialCollection !== nextProps.initialCollection)) {
if (nextProps.initialCollection) {
this.state.journalUid = nextProps.initialCollection;
this.setState({
journalUid: nextProps.initialCollection,
});
} 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) ||
(this.props.initialCollection !== nextProps.initialCollection)) {
if (nextProps.initialCollection) {
this.state.journalUid = nextProps.initialCollection;
this.setState({
journalUid: nextProps.initialCollection,
});
} 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 { pure } from 'recompose';
export const ExternalLink = pure((props: any) => (
<a target="_blank" rel="noopener" {...props} />
export const ExternalLink = pure(({children, ...props}: any) => (
<a target="_blank" rel="noopener" {...props}>
{children}
</a>
));
export default ExternalLink;

Loading…
Cancel
Save