Skip to content

Commit

Permalink
fix: incorect types
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoeryanto committed Mar 14, 2018
1 parent 60ee9f1 commit 7e82411
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions src/components/Pricing.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ const Pricing = ({ data }) => (
)

Pricing.propTypes = {
data: PropTypes.shape({
plan: PropTypes.string,
price: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
description: PropTypes.string,
items: PropTypes.array,
}),
data: PropTypes.arrayOf(
PropTypes.shape({
plan: PropTypes.string,
price: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
description: PropTypes.string,
items: PropTypes.array,
})
),
}

export default Pricing
2 changes: 1 addition & 1 deletion src/templates/about-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const AboutPageTemplate = ({ title, content, contentComponent }) => {
AboutPageTemplate.propTypes = {
title: PropTypes.string.isRequired,
content: PropTypes.string,
contentComponent: PropTypes.instanceOf(React.Component),
contentComponent: PropTypes.func,
}

const AboutPage = ({ data }) => {
Expand Down
4 changes: 2 additions & 2 deletions src/templates/blog-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const BlogPostTemplate = ({

BlogPostTemplate.propTypes = {
content: PropTypes.string.isRequired,
contentComponent: PropTypes.instanceOf(React.Component),
contentComponent: PropTypes.func,
description: PropTypes.string,
title: PropTypes.string,
helmet: PropTypes.instanceOf(Helmet),
Expand All @@ -54,7 +54,7 @@ const BlogPost = ({ data }) => {

BlogPost.propTypes = {
data: PropTypes.shape({
data: PropTypes.object,
markdownRemark: PropTypes.object,
}),
}

Expand Down

0 comments on commit 7e82411

Please sign in to comment.