import type { NewsPost } from "../../lib/bbs"; import AttachmentLink from "./AttachmentLink"; import PostActions from "./PostActions"; import PostBody, { unembeddedAttachments } from "./PostBody"; import PostMeta from "./PostMeta"; interface NewsCardProps { news: NewsPost; handle: string; pds: string; did: string; isSysop: boolean; onDelete: () => void; } export default function NewsCard({ news, handle, pds, did, isSysop, onDelete, }: NewsCardProps) { const remaining = unembeddedAttachments(news.attachments, news.body); return (

{news.title}

{news.body} {remaining.length > 0 && (
{remaining.map((attachment, index) => ( ))}
)}
); }