diff --git a/src/templates/ContentWrapperTemplate.jsx b/src/templates/ContentWrapperTemplate.jsx index 2039ff9e..c26c5bb8 100644 --- a/src/templates/ContentWrapperTemplate.jsx +++ b/src/templates/ContentWrapperTemplate.jsx @@ -14,9 +14,10 @@ export default class ContentWrapperTemplate extends Component { static propTypes = { data: PropTypes.object.isRequired, location: PropTypes.object.isRequired, - pageContext: PropTypes.object.isRequired, + slug: PropTypes.string.isRequired, toc: PropTypes.object.isRequired, - info: PropTypes.object.isRequired + info: PropTypes.object.isRequired, + children: PropTypes.any } sectionTitle = this.props.data.allSectionsYaml.edges.map(({ node }) => { @@ -26,7 +27,7 @@ export default class ContentWrapperTemplate extends Component { }) render() { - const { location, pageContext } = this.props + const { location } = this.props const { title, description, version } = this.props.info return ( @@ -38,7 +39,7 @@ export default class ContentWrapperTemplate extends Component { diff --git a/src/templates/Swagger/index.jsx b/src/templates/Swagger/index.jsx index b7fa61af..b02fb72e 100644 --- a/src/templates/Swagger/index.jsx +++ b/src/templates/Swagger/index.jsx @@ -61,7 +61,7 @@ export default function ApiSwaggerTemplate({ data={data} path={path} location={location} - pageContext={pageContext} + slug={pageContext.slug} info={info} toc={} > diff --git a/src/templates/Typedoc/index.jsx b/src/templates/Typedoc/index.jsx index 56c6a30a..c09b5782 100644 --- a/src/templates/Typedoc/index.jsx +++ b/src/templates/Typedoc/index.jsx @@ -17,7 +17,7 @@ export default function TypedocTemplate({ data, path, location, pageContext }) { data={data} path={path} location={location} - pageContext={pageContext} + slug={pageContext.slug} info={typedoc.info} toc={} >