intergated delete api

This commit is contained in:
Pramod Mahajan 2025-05-28 11:58:16 +05:30
parent fc30db8532
commit cae2f2fffd

View File

@ -91,7 +91,13 @@ const ManageBucket = () => {
const handleDeleteContact = async () => {
try {
// delete api calling here
const resp = await DirectoryRepository.DeleteBucket( deleteBucket );
const cache_buckets = getCachedData("buckets") || [];
const updatedBuckets = cache_buckets.filter((bucket) =>
bucket.id != deleteBucket
);
cacheData("buckets", updatedBuckets);
setBucketList(updatedBuckets);
showToast("Bucket deleted successfully", "success");
setDeleteBucket(null);
} catch (error) {