mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-26 20:22:32 +02:00
Update
This commit is contained in:
@@ -5,31 +5,31 @@ import BlogPage from '../components/BlogPage'
|
||||
import { config } from 'config'
|
||||
|
||||
class MarkdownWrapper extends React.Component {
|
||||
render() {
|
||||
const { route } = this.props
|
||||
const post = route.page.data
|
||||
render() {
|
||||
const {route} = this.props
|
||||
const post = route.page.data
|
||||
|
||||
let layout, template
|
||||
layout = post.layout
|
||||
let layout, template
|
||||
layout = post.layout
|
||||
|
||||
if (layout != 'page') {
|
||||
template = <BlogPost {...this.props}/>
|
||||
} else {
|
||||
template = <BlogPage {...this.props}/>
|
||||
if (layout != 'page') {
|
||||
template = <BlogPost {...this.props}/>
|
||||
} else {
|
||||
template = <BlogPage {...this.props}/>
|
||||
}
|
||||
|
||||
return (
|
||||
<DocumentTitle title={ `${post.title} - ${config.siteTitle}` }>
|
||||
<div>
|
||||
{ template }
|
||||
</div>
|
||||
</DocumentTitle>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<DocumentTitle title={`${post.title} - ${config.siteTitle}`}>
|
||||
<div>
|
||||
{template}
|
||||
</div>
|
||||
</DocumentTitle>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
MarkdownWrapper.propTypes = {
|
||||
route: React.PropTypes.object,
|
||||
route: React.PropTypes.object,
|
||||
}
|
||||
|
||||
export default MarkdownWrapper
|
Reference in New Issue
Block a user