Skip to content

The open-source app everyone uses to manage agents at work

fix(ui): restore attachment delete state hook order

dotta4b654fc81ed4
diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsx
index 49f3013980..05fb5af8d2 100644
--- a/ui/src/pages/IssueDetail.tsx
+++ b/ui/src/pages/IssueDetail.tsx
@@ -305,6 +305,7 @@ export function IssueDetail() {
approvalId: string;
action: "approve" | "reject";
} | null>(null);
+ const [confirmDeleteId, setConfirmDeleteId] = useState<string | null>(null);
const [attachmentError, setAttachmentError] = useState<string | null>(null);
const [attachmentDragActive, setAttachmentDragActive] = useState(false);
const [galleryOpen, setGalleryOpen] = useState(false);
@@ -1220,7 +1221,6 @@ export function IssueDetail() {
const imageAttachments = attachmentList.filter(isImageAttachment);
const nonImageAttachments = attachmentList.filter((a) => !isImageAttachment(a));
const hasAttachments = attachmentList.length > 0;
- const [confirmDeleteId, setConfirmDeleteId] = useState<string | null>(null);
const attachmentUploadButton = (
<>
<input