"use client"; /** * A post shared into a chat, rendered as a card with its author. * * The contents are resolved by the BFF on every read, per viewer — never from * a snapshot frozen at send time. So a post that has since been deleted or * hidden arrives as `entity_unavailable` and renders as a tombstone rather * than quietly showing content the reader is no longer allowed to see. */ import Link from "next/link"; import { ImageOff } from "lucide-react"; import { UserAvatar } from "@/components/ui/user-avatar"; import type { Attachment } from "@/lib/chat"; export function SharedPostCard({ attachment }: { attachment: Attachment }) { const post = attachment.entity; if (!post || attachment.entity_unavailable) { return (