Add key to pageLinks within SiteIndex

* Key is required when creating a list of elements
* Adding key removes react warning
* Used title because it should be unique
* Closes #25
This commit is contained in:
Axel Clark 2016-12-10 07:30:16 -05:00
parent 0468cc151d
commit 27f9d45422

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>