import React from 'react'; import PropTypes from 'prop-types'; const env = process.env.GATSBY_ACTIVE_ENV || process.env.NODE_ENV || 'development'; export default function HTML(props) { return ( {props.headComponents} {env === 'production' && } {props.preBodyComponents}
{props.postBodyComponents} ); } HTML.propTypes = { htmlAttributes: PropTypes.object, headComponents: PropTypes.array, bodyAttributes: PropTypes.object, preBodyComponents: PropTypes.array, body: PropTypes.string, postBodyComponents: PropTypes.array, };