Skip to content

Commit

Permalink
♿ fix BlogPost link
Browse files Browse the repository at this point in the history
  • Loading branch information
yokinist committed Sep 11, 2021
1 parent 0882992 commit 54bdd9c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions components/BlogPost.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ import formatDate from '@/lib/formatDate'

const BlogPost = ({ post }) => {
return (
<article key={post.id} className="mb-6 md:mb-8">
<header className="flex flex-col justify-between md:flex-row md:items-baseline">
<Link href={`${BLOG.path}/${post.slug}`}>
<a>
<Link href={`${BLOG.path}/${post.slug}`}>
<a>
<article key={post.id} className="mb-6 md:mb-8">
<header className="flex flex-col justify-between md:flex-row md:items-baseline">
<h2 className="text-lg md:text-xl font-medium mb-2 cursor-pointer text-black dark:text-gray-100">
{post.title}
</h2>
</a>
</Link>
<time className="flex-shrink-0 text-gray-600 dark:text-gray-400">
{formatDate(post?.date?.start_date || post.createdTime, BLOG.lang)}
</time>
</header>
<main>
<p className="hidden md:block leading-8 text-gray-700 dark:text-gray-300">
{post.summary}
</p>
</main>
</article>
<time className="flex-shrink-0 text-gray-600 dark:text-gray-400">
{formatDate(post?.date?.start_date || post.createdTime, BLOG.lang)}
</time>
</header>
<main>
<p className="hidden md:block leading-8 text-gray-700 dark:text-gray-300">
{post.summary}
</p>
</main>
</article>
</a>
</Link>
)
}

Expand Down

0 comments on commit 54bdd9c

Please sign in to comment.