image is a link

This commit is contained in:
Karol Wypchlo 2021-04-01 01:25:33 +02:00
parent d2146e6d56
commit 9dd311892f
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,9 @@ import SEO from "../components/seo";
const NewsCard = ({ ...props }) => {
return (
<div className="flex flex-col">
<img src={`https://picsum.photos/320/170?${Math.random()}`} alt={props.frontmatter.title} />
<Link to={props.fields.slug}>
<img src={`https://picsum.photos/320/170?${Math.random()}`} alt={props.frontmatter.title} />
</Link>
<Link to={props.fields.slug} className="text-xl mt-6 hover:text-primary transition-colors duration-200">
{props.frontmatter.title}
</Link>