import { convertUtc } from "../lib/convertUtc.ts"; import { truncateString } from "../lib/truncate.ts"; export const PostCard = function PostCard({ post }: { post: Post }) { return (

{post.title}

Written by{" "} {post.first_name} {post.last_name} {" "} at {convertUtc(post.created_at)}

{truncateString(post.body, 15)}

); }; export type Post = { post_id: number; author_id: number; first_name: string; last_name: string; title: string; body: string; created_at: string; slug: string; };