From 331a60a89922012d7e8978b1ced52e47a17c524c Mon Sep 17 00:00:00 2001 From: Kartik sharma Date: Wed, 9 Jul 2025 16:06:30 +0530 Subject: [PATCH] Increase the size of table in Projects Directory and show text in center and add 200 px height. --- src/pages/Directory/Directory.jsx | 143 +++++++++++++++++------------- 1 file changed, 82 insertions(+), 61 deletions(-) diff --git a/src/pages/Directory/Directory.jsx b/src/pages/Directory/Directory.jsx index 05f465c9..2509364f 100644 --- a/src/pages/Directory/Directory.jsx +++ b/src/pages/Directory/Directory.jsx @@ -363,75 +363,97 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
- {/* Loader when switching between Active/Pending or filtering */} - {loading && ( -
-
- Loading... -
-
- )} - - {/* Empty state messages */} - {!loading && (viewType === "card" || viewType === "list") && ( -
- {contacts?.length === 0 && ( -

No contact found

- )} - {contacts?.length > 0 && currentItems.length === 0 && ( -

No matching contact found

- )} -
- )} - - {/* List View */} - {!loading && viewType === "list" && currentItems.length > 0 && ( -
-
+ {/* LIST VIEW */} + {viewType === "list" && ( +
+
- {currentItems.map((contact) => ( - - ))} + {!loading && contacts?.length === 0 ? ( + + +
+

No contact found

+
+ + + ) : !loading && contacts?.length > 0 && currentItems.length === 0 ? ( + + +
+

No matching contact found

+
+ + + ) : ( + !loading && + currentItems.map((contact) => ( + + )) + )}
)} - {/* Card View */} - {!loading && viewType === "card" && currentItems.length > 0 && ( -
- {currentItems.map((contact) => ( + {/* CARD VIEW */} + {viewType === "card" && ( + <> + {contacts?.length === 0 && !loading ? (
- +

No contact found

- ))} -
+ ) : currentItems.length === 0 && !loading ? ( +
+

No matching contact found

+
+ ) : ( +
+ {currentItems.map((contact) => ( +
+ +
+ ))} +
+ )} + )} - {/* Notes View */} - {!loading && viewType === "notes" && ( + {/* NOTES VIEW */} + {viewType === "notes" && (
{ {!loading && viewType !== "notes" && contacts?.length > 0 && - filteredContacts.length > ITEMS_PER_PAGE && ( + currentItems.length > ITEMS_PER_PAGE && (