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