From 27f9d4542223521374acfe3c7e64d3c7cb518f45 Mon Sep 17 00:00:00 2001 From: Axel Clark Date: Sat, 10 Dec 2016 07:30:16 -0500 Subject: [PATCH 1/2] 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 --- pages/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.jsx b/pages/index.jsx index b1853e5..fcbeeed 100644 --- a/pages/index.jsx +++ b/pages/index.jsx @@ -23,7 +23,7 @@ class SiteIndex extends React.Component { const category = access(page, 'data.category') pageLinks.push( -
+
From eb9274ae9214b753839d09a0c750f7a35e7de6b5 Mon Sep 17 00:00:00 2001 From: Axel Clark Date: Sat, 10 Dec 2016 07:54:47 -0500 Subject: [PATCH 2/2] Update required prop for SitePost and Site Page * Changed required prop from post to route * Removed propType for pages * These are objects on route prop and not passed in individually * Closes #25 --- components/SitePage/index.jsx | 3 +-- components/SitePost/index.jsx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/SitePage/index.jsx b/components/SitePage/index.jsx index 10f9152..f92ad56 100644 --- a/components/SitePage/index.jsx +++ b/components/SitePage/index.jsx @@ -33,8 +33,7 @@ class SitePage extends React.Component { } SitePage.propTypes = { - post: React.PropTypes.object.isRequired, - pages: React.PropTypes.array, + route: React.PropTypes.object.isRequired, } export default SitePage diff --git a/components/SitePost/index.jsx b/components/SitePost/index.jsx index 942f4f4..01a693a 100644 --- a/components/SitePost/index.jsx +++ b/components/SitePost/index.jsx @@ -46,8 +46,7 @@ class SitePost extends React.Component { } SitePost.propTypes = { - post: React.PropTypes.object.isRequired, - pages: React.PropTypes.array, + route: React.PropTypes.object.isRequired } export default SitePost