diff --git a/src/pages/Directory/Directory.jsx b/src/pages/Directory/Directory.jsx
index 8f72ac81..23b01267 100644
--- a/src/pages/Directory/Directory.jsx
+++ b/src/pages/Directory/Directory.jsx
@@ -38,7 +38,7 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
const [IsDeleting, setDeleting] = useState(false);
const [openBucketModal, setOpenBucketModal] = useState(false);
const [notes, setNotes] = useState([]);
- const [filterAppliedNotes, setFilterAppliedNotes] = useState([]);
+ const [filterAppliedNotes, setFilterAppliedNotes] = useState([]);
// const [selectedOrgs, setSelectedOrgs] = useState([]);
// ✅ Changed to an array for multiple selections
@@ -260,7 +260,7 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
}, [prefernceContacts]);
return (
-
+
{IsPage && (
{
setOpenBucketModal={setOpenBucketModal}
contactsToExport={contacts}
notesToExport={notes}
- selectedNoteNames={selectedNoteNames}
+ selectedNoteNames={selectedNoteNames}
setSelectedNoteNames={setSelectedNoteNames}
notesForFilter={notes}
setFilterAppliedNotes={setFilterAppliedNotes}
@@ -361,23 +361,9 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
- {(viewType === "card" || viewType === "list" || viewType === "notes") && (
-
- {!loading && (viewType === "card" || viewType === "list") && contacts?.length === 0 && (
-
No contact found
- )}
- {!loading &&
- (viewType === "card" || viewType === "list") &&
- contacts?.length > 0 &&
- currentItems.length === 0 && (
-
No matching contact found
- )}
-
- )}
-
{viewType === "list" && (
-
-
+
+
{!loading &&
currentItems.map((contact) => (
@@ -394,12 +380,22 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
/>
))}
+
+ {/* Empty state AFTER list */}
+ {!loading && contacts?.length === 0 && (
+
No contact found
+ )}
+ {!loading &&
+ contacts?.length > 0 &&
+ currentItems.length === 0 && (
+
No matching contact found
+ )}
)}
{viewType === "card" && (
-
+
{!loading &&
currentItems.map((contact) => (
{
/>
))}
+
+ {/* Empty state for card view */}
+ {!loading && contacts?.length === 0 && (
+
No contact found
+ )}
+ {!loading &&
+ contacts?.length > 0 &&
+ currentItems.length === 0 && (
+
No matching contact found
+ )}
)}
@@ -428,7 +434,7 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
setNotesForFilter={setNotes}
searchText={searchText}
setIsOpenModalNote={setIsOpenModalNote}
- filterAppliedNotes={filterAppliedNotes}
+ filterAppliedNotes={filterAppliedNotes}
/>
)}
@@ -464,7 +470,10 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
))}
-
+