diff --git a/src/containers/apps/DeleteAppConfirm.tsx b/src/containers/apps/DeleteAppConfirm.tsx index e9daaef6..d400465f 100644 --- a/src/containers/apps/DeleteAppConfirm.tsx +++ b/src/containers/apps/DeleteAppConfirm.tsx @@ -12,6 +12,7 @@ export default function onDeleteAppClicked( onFinished: (success: boolean) => void ) { const volumesToDelete: IHashMapGeneric = {} + const allVolumesNames = new Set() const appDefinitions: IAppDef[] = [] @@ -21,13 +22,11 @@ export default function onDeleteAppClicked( appDefinitions.push(Utils.copyObject(a)) }) - const allVolumes: string[] = [] - appDefinitions.forEach((appDef) => { if (appDef.volumes) { appDef.volumes.forEach((v) => { if (v.volumeName) { - allVolumes.push(v.volumeName) + allVolumesNames.add(v.volumeName) volumesToDelete[v.volumeName] = true } }) @@ -55,13 +54,13 @@ export default function onDeleteAppClicked( Please note that this is not reversible. -

+

Please select the volumes you want to delete. Note that if any of the volumes are being used by other CapRover apps, they will not be deleted even if you select them. Deleting volumes takes more than 10 seconds, please be patient

- {allVolumes.map((v) => { + {Array.from(allVolumesNames).map((v) => { return (