mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-27 15:28:43 +01:00
eb9274ae92
* Changed required prop from post to route * Removed propType for pages * These are objects on route prop and not passed in individually * Closes #25
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import React from 'react'
|
|
import moment from 'moment'
|
|
import { RouteHandler, Link } from 'react-router'
|
|
import { prefixLink } from 'gatsby-helpers'
|
|
import access from 'safe-access'
|
|
import { config } from 'config'
|
|
import SiteSidebar from '../SiteSidebar'
|
|
import './style.css';
|
|
|
|
class SitePage extends React.Component {
|
|
render() {
|
|
const {route} = this.props
|
|
const post = route.page.data
|
|
|
|
return (
|
|
<div>
|
|
<SiteSidebar {...this.props}/>
|
|
<div className='content'>
|
|
<div className='main'>
|
|
<div className='main-inner'>
|
|
<div className='blog-page'>
|
|
<div className='text'>
|
|
<h1>{ post.title }</h1>
|
|
<div dangerouslySetInnerHTML={ { __html: post.body} } />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
SitePage.propTypes = {
|
|
route: React.PropTypes.object.isRequired,
|
|
}
|
|
|
|
export default SitePage
|