{"size": 2454, "ext": "js", "max_stars_repo_path": "src/templates/membership-application-page.js", "max_stars_repo_name": "hdiradmin/hdir", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/templates/membership-application-page.js", "max_issues_repo_name": "hdiradmin/hdir", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/templates/membership-application-page.js", "max_forks_repo_name": "hdiradmin/hdir", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.1551724138, "max_line_length": 72, "alphanum_fraction": 0.4747351263}
import React from 'react'
import PropTypes from 'prop-types'
import { graphql } from 'gatsby'

import Form from '../components/Form'
import Hero from '../components/Hero'
import Layout from '../components/Layout'

export class MembershipApplicationPageTemplate extends React.Component {
    render() {
        const { form, hero, lang } = this.props;

        return (
            <React.Fragment>
                <Hero hero={ hero } />
                <Form form={ form } lang={ lang } />
            </React.Fragment>
        )
    }
}

MembershipApplicationPageTemplate.propTypes = {
  form: PropTypes.object,
  hero: PropTypes.object,
  lang: PropTypes.string
}

const MembershipApplicationPage = ({ data }) => {
  const { markdownRemark: post } = data

  return (
    <Layout lang={post.frontmatter.lang}>
      <MembershipApplicationPageTemplate
        form={post.frontmatter.form} 
        hero={post.frontmatter.hero}
        lang={post.frontmatter.lang}
      />
    </Layout>
  )
}

MembershipApplicationPage.propTypes = {
  data: PropTypes.object.isRequired,
}

export default MembershipApplicationPage

export const membershipApplicationPageQuery = graphql`
  query MembershipApplicationPage($id: String!) {
    markdownRemark(id: { eq: $id }) {
      html
      frontmatter {
        lang
        form {
          button
          isPdf
          name
          pdf {
            day
            defaultFullName
            header{
              leftColumn {
                text
              }
              rightColumn {
                text
              }
              title
            }
            mailingDetails {
              text
            }
            paymentDetails {
              text
            }
            signature
            title
          }
          sections {
              fields {
                isFullWidth
                isRequired
                name
                title
                type
              }
              title
          }
          success {
            button
            subtitle
            title
          }
        }
        hero {
          height
          image {
            childImageSharp {
              fluid(maxWidth: 4096, quality: 100) {
                ...GatsbyImageSharpFluid
              }
            }
          }
          subtitle
          title
          top
          link {
            title
            page
          }
        }
      }
    }
  }
`
