This commit is contained in:
Kyle Mathews 2018-01-10 07:41:31 -08:00
parent 1a862b7fab
commit a9b60609b6

View file

@ -10,7 +10,7 @@ class BlogPostTemplate extends React.Component {
render() { render() {
const post = this.props.data.markdownRemark const post = this.props.data.markdownRemark
const siteTitle = get(this.props, 'data.site.siteMetadata.title') const siteTitle = get(this.props, 'data.site.siteMetadata.title')
const { previous, next } = this.props.pathContext; const { previous, next } = this.props.pathContext
return ( return (
<div> <div>
@ -34,28 +34,30 @@ class BlogPostTemplate extends React.Component {
/> />
<Bio /> <Bio />
<ul style={{ <ul
style={{
display: 'flex', display: 'flex',
flexWrap: 'wrap', flexWrap: 'wrap',
justifyContent: 'space-between', justifyContent: 'space-between',
listStyle: 'none', listStyle: 'none',
padding: 0, padding: 0,
}}> }}
{ previous && ( >
{previous && (
<li> <li>
<Link to={previous.fields.slug} rel="prev"> <Link to={previous.fields.slug} rel="prev">
{previous.frontmatter.title} {previous.frontmatter.title}
</Link> </Link>
</li> </li>
) } )}
{ next && ( {next && (
<li> <li>
<Link to={next.fields.slug} rel="next"> <Link to={next.fields.slug} rel="next">
{next.frontmatter.title} {next.frontmatter.title}
</Link> </Link>
</li> </li>
) } )}
</ul> </ul>
</div> </div>
) )