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 {post.created_at}

{truncateString(post.body, 15)}

); }; export interface Post { post_id: number; first_name: string; last_name: string; title: string; body: string; created_at: string; }