src/templates/SharingTemplate.js
// `data` is injected by the GraphQL query at the bottom
`data` is injected by the GraphQL query at the bottom
` data ` is injected by the GraphQL query at the bottom
function SharingTemplate({ data }) {
  const { markdownRemark } = data  
  const { frontmatter, html } = markdownRemark
  return (
    <Layout fullMenu>
      <article id="main">
        <header>
          <h2>Sharings</h2>
        </header>
        <section className="wrapper style5">
          <div className="inner">
            <section>
              <header>
                <p>{frontmatter.date}</p>
                <h2>{frontmatter.title}</h2>
                <p>{frontmatter.description}</p>
              </header>
            </section>
            <hr />
            <div dangerouslySetInnerHTML={{ __html: html }}/>
          </div>
        </section>
      </article>
    </Layout>
  )
}
function SharingTemplate ( { data } ) { const { markdownRemark } = data const { frontmatter , html } = markdownRemark return ( < Layout fullMenu > < article id = "main" > < header > < h2 > Sharings < / h2 > < / header > < section className = "wrapper style5" > < div className = "inner" > < section > < header > < p > { frontmatter . date } < / p > < h2 > { frontmatter . title } < / h2 > < p > { frontmatter . description } < / p > < / header > < / section > < hr / > < div dangerouslySetInnerHTML = { { __html : html } } / > < / div > < / section > < / article > < / Layout > ) }
`data` is injected by the GraphQL query at the bottom
` data ` is injected by the GraphQL query at the bottom
// data.markdownRemark holds our post data