always render delete button

This commit is contained in:
Nate 2024-11-27 14:15:57 -08:00
parent 12fba164ae
commit eced0d09f0

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>
);