import React from 'react'; import { AlertCircle, X } from 'lucide-react'; import { useComposerAttachments, useRemoveComposerAttachment } from '../../contexts/ComposerContext'; /** Thumbnail tray of pending composer attachments with upload/error states. */ const ComposerAttachments: React.FC = () => { const attachments = useComposerAttachments(); const remove = useRemoveComposerAttachment(); if (attachments.length === 0) return null; return (
{attachments.map((att) => (
{att.name} {att.status === 'uploading' && (
)} {att.status === 'error' && (
)}
))}
); }; export default ComposerAttachments;