Fix query for blog posts and featured image, add img package

This commit is contained in:
Moris Zen
2018-07-06 11:54:24 +02:00
parent 1641186ad5
commit 8d435d1ce6
4 changed files with 23 additions and 9 deletions

View File

@@ -1,15 +1,17 @@
import React from 'react'
import Link from 'gatsby-link'
import Img from 'gatsby-image'
import ImgSprint from '../images/wow-we-did-design-sprint-remotely.png'
const Card = ({ ...props }) => (
<article
key={props.postId}
className="my-4 lg:my-2 lg:mx-2 w-full rounded overflow-hidden shadow-md hover:shadow-lg"
>
<article className="my-4 lg:my-2 lg:mx-2 w-full rounded overflow-hidden shadow-md hover:shadow-lg">
<Link to={props.url}>
<img className="w-full" src={ImgSprint} alt="Sprint Work" />
{props.image ? (
<Img resolutions={props.image} />
) : (
<img className="w-full" src={ImgSprint} alt="Sprint Work" />
)}
</Link>
<div className="px-6 py-4">
<div className="font-bold text-xl mb-2">