Skip to content

Commit

Permalink
πŸ’„ Fix blog post date render
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Muir committed Sep 13, 2023
1 parent 1780388 commit ff35afe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/blog/post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import Breadcrumbs from '@components/nav/breadcrumbs';

export default function Post({ post }: { post: any }) {
const blocks = post.blocks as any[];
const date = new Date(post.created_time).toLocaleDateString('en-GB', {});
return (
<article class="flex max-w-xl flex-col items-start justify-between bg-white p-4 rounded-md">
<div class="flex items-center gap-x-4 text-xs" hx-boost="true">
<time datetime="2020-03-16" class="text-gray-500">Mar 16, 2020</time>
<time datetime={post.created_time} class="text-gray-500">{date}</time>
{/* TODO: Implement tags */}
{/* <a href={`/blog/${post.id}`} class="relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100">Marketing</a> */}
</div>
Expand Down

0 comments on commit ff35afe

Please sign in to comment.