diff --git a/src/pages/Directory/Directory.jsx b/src/pages/Directory/Directory.jsx index 692ca1af..30f3ac45 100644 --- a/src/pages/Directory/Directory.jsx +++ b/src/pages/Directory/Directory.jsx @@ -229,19 +229,21 @@ const handleDeleteContact = async (overrideId = null) => { color:"primary", onClick: () => setOpenBucketModal(true), }); - } - actions.push({ - label: "New Contact", - icon: "bx bx-plus-circle", - color: "warning", - onClick: () => setIsOpenModal(true), - } ); - + } + if ( buckets?.length > 0 ) + { + actions.push( { + label: "New Contact", + icon: "bx bx-plus-circle", + color: "warning", + onClick: () => setIsOpenModal( true ), + } ); + } setActions(actions); return () => setActions([]); -}, [IsPage]); +}, [IsPage,buckets]); useEffect( () => { setPerfence(prefernceContacts)