Skip to content

Commit

Permalink
update jsBlogPostTemplate to accept graphql based on page
Browse files Browse the repository at this point in the history
  • Loading branch information
jbolda committed Aug 23, 2017
1 parent 896db95 commit e049687
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class choroplethBase extends React.Component {
}

render() {
console.log(this)
let data = this.props.data.markdownRemark
let html = data.html
let frontmatter = this.props.data.jsFrontmatter.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class choroplethAltBase extends React.Component {
}

render() {
console.log(this)
let data = this.props.data.markdownRemark
let html = data.html
let frontmatter = this.props.data.jsFrontmatter.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,8 @@ import moment from "moment"
class jsBlogPostTemplate extends React.Component {
render() {
console.log(this)
return (
<div className="javascriptPost">
{this.props.children()}
</div>
)
/*
// we might expect to use something like this
// like used in layouts.
{this.props.children()}
// we eventually want to use the below
// but comment out for now to gatsby can build
let frontmatter = this.props.frontmatter
let siteMetadata = this.props.siteMetadata
let frontmatter = this.props.data.jsFrontmatter.data
let siteMetadata = this.props.data.site.siteMetadata

const home = (
<div className="nav">
Expand Down Expand Up @@ -103,7 +90,6 @@ class jsBlogPostTemplate extends React.Component {
</div>
</div>
)
*/
}
}

Expand All @@ -124,5 +110,16 @@ query javascriptTemplateBySlug($slug: String!) {
description
}
}
site {
siteMetadata {
title
siteDescr
siteAuthor
siteEmailUrl
siteEmailPretty
siteTwitterUrl
siteTwitterPretty
}
}
}
`

0 comments on commit e049687

Please sign in to comment.