Created
August 24, 2018 17:03
-
-
Save daydream05/f24232f835b3c2f6b9180e493ab2d96e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Media query="(max-width: 550px)"> | |
{matches => | |
matches ? ( | |
<CardCarousel> | |
{blogs.map((blog, index) => { | |
return ( | |
<Link | |
key={index} | |
to={blog.node.fields.path} | |
> | |
<BlogCard | |
key={index} | |
imageFluid={blog.node.coverPhoto.fluid} | |
tags={blog.node.tags} | |
excerpt={blog.node.article.childMarkdownRemark.excerpt} | |
title={blog.node.title} | |
/> | |
</Link> | |
) | |
})} | |
</CardCarousel> | |
) : ( | |
<Row> | |
{blogs.map((blog, index) => { | |
return ( | |
<Col | |
key={index} | |
md={4} | |
> | |
<Link | |
to={blog.node.fields.path} | |
> | |
<BlogCard | |
key={index} | |
imageFluid={blog.node.coverPhoto.fluid} | |
tags={blog.node.tags} | |
excerpt={blog.node.article.childMarkdownRemark.excerpt} | |
title={blog.node.title} | |
/> | |
</Link> | |
</Col> | |
) | |
})} | |
</Row> | |
) | |
} | |
</Media> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment