mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-26 14:59:14 +01:00
refactor: fixing linting errors for wrappers/md.jsx
This commit is contained in:
parent
7b8b07b05a
commit
b683c5d7e3
@ -1,34 +1,34 @@
|
||||
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
|
||||
render() {
|
||||
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}/>
|
||||
} else {
|
||||
template = <SitePage {...this.props}/>
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Helmet title={ `${post.title} - ${config.siteTitle}` }/>
|
||||
{ template }
|
||||
</div>
|
||||
);
|
||||
if (layout !== 'page') {
|
||||
template = <SitePost {...this.props} />;
|
||||
} else {
|
||||
template = <SitePage {...this.props} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Helmet title={`${post.title} - ${config.siteTitle}`} />
|
||||
{template}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
MarkdownWrapper.propTypes = {
|
||||
route: React.PropTypes.object,
|
||||
}
|
||||
route: React.PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
||||
};
|
||||
|
||||
export default MarkdownWrapper
|
||||
export default MarkdownWrapper;
|
||||
|
Loading…
Reference in New Issue
Block a user