Fix prettier integration, format (#31)

* Fix prettier integration, format

* Reformat again
This commit is contained in:
Tom Moor
2017-04-27 21:48:13 -07:00
committed by GitHub
parent 51fade7439
commit 2095b3a874
74 changed files with 823 additions and 808 deletions

View File

@@ -4,19 +4,18 @@ import { observer } from 'mobx-react';
import styles from './DocumentHtml.scss';
@observer
class DocumentHtml extends React.Component {
@observer class DocumentHtml extends React.Component {
static propTypes = {
html: PropTypes.string.isRequired,
}
};
componentDidMount = () => {
this.setExternalLinks();
}
};
componentDidUpdate = () => {
this.setExternalLinks();
}
};
setExternalLinks = () => {
const links = ReactDOM.findDOMNode(this).querySelectorAll('a');
@@ -25,12 +24,12 @@ class DocumentHtml extends React.Component {
link.target = '_blank'; // eslint-disable-line no-param-reassign
}
});
}
};
render() {
return (
<div
className={ styles.document }
className={styles.document}
dangerouslySetInnerHTML={{ __html: this.props.html }}
/>
);