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

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