Fix query for blog posts and featured image, add img package
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user