if have't any bucket user can't create contacts

This commit is contained in:
Pramod Mahajan 2025-06-09 12:21:45 +05:30
parent 662d464271
commit 379d9ecb8b

View File

@ -229,19 +229,21 @@ const handleDeleteContact = async (overrideId = null) => {
color:"primary", color:"primary",
onClick: () => setOpenBucketModal(true), onClick: () => setOpenBucketModal(true),
}); });
} }
actions.push({ if ( buckets?.length > 0 )
label: "New Contact", {
icon: "bx bx-plus-circle", actions.push( {
color: "warning", label: "New Contact",
onClick: () => setIsOpenModal(true), icon: "bx bx-plus-circle",
} ); color: "warning",
onClick: () => setIsOpenModal( true ),
} );
}
setActions(actions); setActions(actions);
return () => setActions([]); return () => setActions([]);
}, [IsPage]); }, [IsPage,buckets]);
useEffect( () => useEffect( () =>
{ {
setPerfence(prefernceContacts) setPerfence(prefernceContacts)