Fixing some propTypes

This commit is contained in:
Jeff Avallone 2018-02-11 10:57:41 -05:00
parent b009d078b6
commit 5afca2241a
2 changed files with 8 additions and 2 deletions

View File

@ -23,7 +23,10 @@ Message.propTypes = {
PropTypes.func PropTypes.func
]), ]),
heading: PropTypes.string.isRequired, heading: PropTypes.string.isRequired,
children: PropTypes.element.isRequired children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]).isRequired
}; };
export default Message; export default Message;

View File

@ -52,7 +52,10 @@ const PageTemplate = ({ title, children }) => (
PageTemplate.propTypes = { PageTemplate.propTypes = {
title: PropTypes.string, title: PropTypes.string,
children: PropTypes.element children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
])
}; };
const renderToString = content => '<!DOCTYPE html>' + ReactDOMServer.renderToString(content); const renderToString = content => '<!DOCTYPE html>' + ReactDOMServer.renderToString(content);