import Row from "@moduletrace/twui/layout/Row"; import type { PendingAttachment } from "../(hooks)/use-composer-attachments"; import ComposerAttachmentChip from "./composer-attachment-chip"; type Props = { pending: PendingAttachment[]; onRemove: (params: { key: string }) => void; }; /** * The next message's files, just above the composer rule. */ export default function ComposerAttachments({ pending, onRemove }: Props) { if (!pending.length) return null; return ( {pending.map((item) => ( onRemove({ key: item.key })} /> ))} ); }