refactor(SessionItem): remove confirmation modal for delete action
Simplify delete flow by removing the confirmation modal and directly calling onDelete
This commit is contained in:
@@ -57,13 +57,7 @@ const SessionItem: FC<SessionItemProps> = ({ session, agentId, onDelete, onPress
|
||||
key="delete"
|
||||
className="text-danger"
|
||||
onClick={() => {
|
||||
window.modal.confirm({
|
||||
title: t('agent.session.delete.title'),
|
||||
content: t('agent.session.delete.content'),
|
||||
centered: true,
|
||||
okButtonProps: { danger: true },
|
||||
onOk: () => onDelete()
|
||||
})
|
||||
onDelete()
|
||||
}}>
|
||||
<DeleteIcon size={14} className="lucide-custom text-danger" />
|
||||
<span className="text-danger">{t('common.delete')}</span>
|
||||
|
||||
Reference in New Issue
Block a user