Merge pull request #26 from axelclark/react-warnings

Updates to remove React warnings
This commit is contained in:
Alexander S 2017-02-05 12:46:22 +02:00 committed by GitHub
commit 9319989198
3 changed files with 3 additions and 5 deletions

View File

@ -33,8 +33,7 @@ class SitePage extends React.Component {
} }
SitePage.propTypes = { SitePage.propTypes = {
post: React.PropTypes.object.isRequired, route: React.PropTypes.object.isRequired,
pages: React.PropTypes.array,
} }
export default SitePage export default SitePage

View File

@ -46,8 +46,7 @@ class SitePost extends React.Component {
} }
SitePost.propTypes = { SitePost.propTypes = {
post: React.PropTypes.object.isRequired, route: React.PropTypes.object.isRequired
pages: React.PropTypes.array,
} }
export default SitePost export default SitePost

View File

@ -23,7 +23,7 @@ class SiteIndex extends React.Component {
const category = access(page, 'data.category') const category = access(page, 'data.category')
pageLinks.push( pageLinks.push(
<div className='blog-post'> <div className='blog-post' key={ title }>
<time dateTime={ moment(datePublished).format('MMMM D, YYYY') }> <time dateTime={ moment(datePublished).format('MMMM D, YYYY') }>
{ moment(datePublished).format('MMMM YYYY') } { moment(datePublished).format('MMMM YYYY') }
</time> </time>