1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

Improvement: Add proptypes to components

This commit is contained in:
Akshay 2021-04-16 17:01:09 +02:00
parent 7e98d8d2c2
commit 2d5574e05e
2 changed files with 9 additions and 23 deletions

View File

@ -1,4 +1,5 @@
import React, { useState } from 'react'
import PropTypes from 'prop-types'
import Layout from '../components/Layout'
import HeaderSection from '../components/HeaderSection'
import Content from '../components/Content'
@ -95,3 +96,7 @@ export default function MarkdownList({ pageContext }) {
</Layout>
)
}
MarkdownList.propTypes = {
pageContext: PropTypes.object.isRequired
}

View File

@ -1,4 +1,5 @@
import React from 'react'
import PropTypes from 'prop-types'
import DocContent from '../components/DocContent'
import Content from '../components/Content'
@ -17,26 +18,6 @@ export default function MarkdownTemplate({ data }) {
)
}
// export const postQuery = graphql`
// query BlogPostByPath($path: String!) {
// markdownRemark(frontmatter: { slug: { eq: $path } }) {
// html
// htmlAst
// tableOfContents
// frontmatter {
// slug
// title
// section
// }
// ...PageFooter
// }
// }
// fragment PageFooter on MarkdownRemark {
// parent {
// ... on File {
// relativePath
// sourceInstanceName
// }
// }
// }
// `
MarkdownTemplate.propTypes = {
data: PropTypes.object.isRequired
}