refactor: fixing linting errors for wrappers/md.jsx

This commit is contained in:
Simon Reinsperger 2017-03-08 17:01:28 +01:00
parent 7b8b07b05a
commit b683c5d7e3

View File

@ -1,21 +1,21 @@
import React from 'react'
import Helmet from 'react-helmet'
import SitePost from '../components/SitePost'
import SitePage from '../components/SitePage'
import { config } from 'config'
import React from 'react';
import Helmet from 'react-helmet';
import { config } from 'config';
import SitePost from '../components/SitePost';
import SitePage from '../components/SitePage';
class MarkdownWrapper extends React.Component {
render() {
const {route} = this.props
const post = route.page.data
let layout, template
const { route } = this.props;
const post = route.page.data;
const layout = post.layout;
let template;
layout = post.layout
if (layout != 'page') {
template = <SitePost {...this.props}/>
if (layout !== 'page') {
template = <SitePost {...this.props} />;
} else {
template = <SitePage {...this.props}/>
template = <SitePage {...this.props} />;
}
return (
@ -28,7 +28,7 @@ class MarkdownWrapper extends React.Component {
}
MarkdownWrapper.propTypes = {
route: React.PropTypes.object,
}
route: React.PropTypes.object, // eslint-disable-line react/forbid-prop-types
};
export default MarkdownWrapper
export default MarkdownWrapper;