review comments addresed

Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
AmbrishRamachandiran
2023-08-25 14:35:39 +05:30
parent 6f691871c5
commit 2a27eebdaa
@@ -85,17 +85,10 @@ const Contents = ({
setBusy(true);
try {
await state.deleteEntity();
const entityNames = [entity]
.flat()
.map(item => item.metadata.title ?? item.metadata.name);
const entityName = entity.metadata.title ?? entity.metadata.name;
onConfirm();
const message =
entityNames.length === 1
? `Removed entity ${entityNames[0]}`
: `Removed entities: ${entityNames.join("', '")}`;
alertApi.post({
message,
message: `Removed entity ${entityName}`,
severity: 'success',
display: 'transient',
});