+ {composerAttachments.map((attachment) => {
+ const sizeLabel = formatAttachmentSize(attachment.size);
+ const statusLabel =
+ attachment.status === "uploading"
+ ? "Uploading to issue"
+ : attachment.status === "error"
+ ? attachment.error ?? "Upload failed"
+ : attachment.inline
+ ? "Inserted inline"
+ : "Attached to issue";
+ return (
+
+ {attachment.status === "uploading" ? (
+
+ ) : attachment.status === "attached" ? (
+
+ ) : (
+
+ )}
+
+ {attachment.name}
+
+ {sizeLabel ? (
+
{sizeLabel}
+ ) : null}
+
{statusLabel}
+
+ );
+ })}
+
+ ) : null}
+