Skip to content

Instantly share code, notes, and snippets.

@miminari
Created November 20, 2020 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miminari/d7da757795ec1b5a5c0a356698d26c3e to your computer and use it in GitHub Desktop.
Save miminari/d7da757795ec1b5a5c0a356698d26c3e to your computer and use it in GitHub Desktop.
<ul className={styles.list}>
{blog.map(blog => (
<li key={blog.id}>
<Link href={`blog/${blog.id}`}>
<a>
<div>
{blog.image ? (
<picture>
<source srcSet={blog.image.url + "?w=160&h=160&fit=crop&dpr=2 2x"} />
<img src={blog.image.url + "?w=160&h=160&fit=crop"} alt="" />
</picture>
) : (
<div className={styles.noImage} />
)}
</div>
{blog.title}
</a>
</Link>
</li>
))}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment