Skip to content

Commit

Permalink
fix: prevent anchor tag creation when image is not shown
Browse files Browse the repository at this point in the history
  • Loading branch information
EATSTEAK committed Oct 9, 2024
1 parent 85cde9c commit 91486ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/post/PostItem.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const {post, minutesRead} = Astro.props;
---

<section>
<a href={`/post/${post.slug}`}>
{
post.data.heroImage && (
{
post.data.heroImage && (
<a href={`/post/${post.slug}`}>
<div
class="mb-2"
style={{
Expand All @@ -27,9 +27,9 @@ const {post, minutesRead} = Astro.props;
height: "16rem",
}}
/>
)
}
</a>
</a>
)
}
<CategoryLabel category={post.data.category ?? "uncategorized"}/>
<a href={`/post/${post.slug}`}>
<h4 class="mt-2">
Expand Down

0 comments on commit 91486ca

Please sign in to comment.