text: import React from 'react'
  import PropTypes from 'prop-types'
  import { NewPageTemplate } from '../../templates/new-page'
  
  const NewPagePreview = ({ entry, getAsset }) => {
    const data = entry.getIn(['data']).toJS()
  
    if (data) {
      return (
        <NewPageTemplate
          image={data.image}
          title={data.title}
          heading={data.heading}
          subheading={data.subheading}
          description={data.description}
          intro={data.intro || { blurbs: [] }}
          mainpitch={data.mainpitch || {}}
        />
      )
    } else {
      return <div>Loading...</div>
    }
  }
  
  NewPagePreview.propTypes = {
    entry: PropTypes.shape({
      getIn: PropTypes.func,
    }),
    getAsset: PropTypes.func,
  }
  
  export default NewPagePreview
  