UNPKG

gatsby-theme-ghost-commento

Version:

Gatsby theme to easily add commento to gatsby-theme-try-ghost

22 lines (17 loc) 480 B
import React from 'react' import PropTypes from 'prop-types' import { Commento } from '../../../components/common' import ThemeContext from '../../../context/ThemeContext' // The actual component const Comments = ({ id }) => ( <ThemeContext.Consumer>{theme => ( <section> <Commento id={id} url={theme.url} /> </section> )} </ThemeContext.Consumer> ) Comments.propTypes = { id: PropTypes.string.isRequired, } export default Comments