16 lines
554 B
TypeScript
16 lines
554 B
TypeScript
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 => <li className="tag">{tag}</li>)}
|
|
</ul>
|
|
<p className="post-list-description">{props.post.data.description}</p>
|
|
</li>
|
|
);
|
|
}
|