website/_components/PostListItem.tsx

17 lines
574 B
TypeScript
Raw Normal View History

2023-08-26 21:26:19 -04:00
interface Props {
post: any;
}
export default function(props: Props) {
return (
<li className="post-list-item">
<a href={props.post.data.url} className="post-list-title">{props.post.data.title}</a>
<time className="post-list-date">{Intl.DateTimeFormat("en-CA", { dateStyle: "long" }).format(props.post.data.date)}</time>
<ul className="tag-list">
{props.post.data.tags.map((tag,index) => <li key={index} className="tag">{tag}</li>)}
2023-08-26 21:26:19 -04:00
</ul>
<p className="post-list-description">{props.post.data.description}</p>
</li>
);
}