Merge pull request #3113 from continuedev/quick-edit-4f1d

always render delete button
This commit is contained in:
Nate Sesti 2024-11-27 14:24:57 -08:00 • committed by GitHub
commit 4a8fb57def
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,9 +27,6 @@ export default function ResponseActions({
(store: RootState) => store.editModeState.isInEditMode,
);
// Only render delete button if there is more than one message
const shouldRenderDelete = index !== 1;
if (isInEditMode) {
return <EditActions index={index} item={item} />;
}
@ -46,11 +43,9 @@ export default function ResponseActions({
</HeaderButtonWithToolTip>
)}
{shouldRenderDelete && (
<HeaderButtonWithToolTip text="Delete" tabIndex={-1} onClick={onDelete}>
<TrashIcon className="h-3.5 w-3.5 text-gray-500" />
</HeaderButtonWithToolTip>
)}
<HeaderButtonWithToolTip text="Delete" tabIndex={-1} onClick={onDelete}>
<TrashIcon className="h-3.5 w-3.5 text-gray-500" />
</HeaderButtonWithToolTip>
<CopyIconButton
tabIndex={-1}
@ -58,7 +53,6 @@ export default function ResponseActions({
clipboardIconClassName="h-3.5 w-3.5 text-gray-500"
checkIconClassName="h-3.5 w-3.5 text-green-400"
/>
<FeedbackButtons item={item} />
</div>
);