Skip to content

Commit

Permalink
use layout in item template
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Jun 18, 2018
1 parent 6f75115 commit adad285
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions examples/using-mongodb/src/templates/item.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import React from "react"
import Layout from "../layouts"

class Item extends React.Component {
render() {
const story = this.props.data.mongodbCloudDocuments

return (
<div>
<a href={story.url} className="itemlink">
{story.name}
</a>
<p>
<div
dangerouslySetInnerHTML={{
__html: story.description.childMarkdownRemark.html,
}}
className="story"
/>
</p>
</div>
<Layout>
<div>
<a href={story.url} className="itemlink">
{story.name}
</a>
<p>
<div
dangerouslySetInnerHTML={{
__html: story.description.childMarkdownRemark.html,
}}
className="story"
/>
</p>
</div>
</Layout>
)
}
}
Expand Down

0 comments on commit adad285

Please sign in to comment.