import { PostData } from "@developomp-site/content/src/types/types" import { faBook, faCalendar, faHourglass, } from "@fortawesome/free-solid-svg-icons" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import { Link } from "wouter" import Card from "@/components/Card" import Tag from "@/components/Tag" import TagList from "@/components/TagList" interface PostCardData extends PostData { content_id: string } interface Props { postData: PostCardData className?: string } export default function PostCard({ postData, className }: Props) { const { content_id, wordCount, date, readTime, title, tags } = postData return ( {title} {/* show "(series)" for urls that matches regex "/series/" */} {/\/series\/[^/]*$/.test(content_id) && " (series)"} {tags && tags.map((tag) => ( ))} {date || "Unknown date"} {readTime ? readTime + " read" : "unknown read time"} {typeof wordCount === "number" ? wordCount + " words" : "unknown length"} ) }