diff --git a/src/components/PostList.js b/src/components/PostList.js index 72723ee..8dab55a 100644 --- a/src/components/PostList.js +++ b/src/components/PostList.js @@ -1,6 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import { Link, graphql } from 'gatsby' +import Img from 'gatsby-image' export default class PostList extends React.Component { render() { @@ -12,10 +13,13 @@ export default class PostList extends React.Component {
{posts.map(({ node: post }) => ( - + {post.featured_media && post.featured_media.localFile && ( +
+ +
+ )}

{post.title}

@@ -58,5 +62,10 @@ export const pageQuery = graphql` fields { link } + featured_media { + localFile { + ...FluidImage + } + } } `