fix(UI): Multiple data product delete modals (#12781)

This commit is contained in:
Saketh Varma 2025-03-11 18:53:06 -03:00 committed by GitHub
parent e59f497ad5
commit 9a4b829853
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,6 @@ import { useEntityRegistryV2 } from '../../../useEntityRegistry';
import { PreviewType } from '../../Entity';
import EditDataProductModal from './EditDataProductModal';
import { REDESIGN_COLORS } from '../../shared/constants';
import useDeleteEntity from '../../shared/EntityDropdown/useDeleteEntity';
const TransparentButton = styled(Button)`
color: ${REDESIGN_COLORS.RED_ERROR};
@ -62,10 +61,8 @@ export default function DataProductResult({ dataProduct, onUpdateDataProduct, se
setDeletedDataProductUrns((currentUrns) => [...currentUrns, dataProduct.urn]);
}
const { onDeleteEntity } = useDeleteEntity(dataProduct.urn, dataProduct.type, dataProduct, deleteDataProduct);
function onDeleteDataProduct() {
onDeleteEntity();
deleteDataProduct();
setTimeout(() => refetch(), 3000);
}