pramod_Task-#239 : Display in Card View contacts List #121

Merged
vikas.nale merged 20 commits from pramod_Task-#239 into Feature_Directory 2025-05-19 07:29:19 +00:00
Showing only changes of commit 1cac05ddcb - Show all commits

View File

@ -79,7 +79,7 @@ const Directory = () => {
); );
}; };
const filteredContacts = useMemo(() => { const filteredContacts = useMemo(() => {
return contacts return ContatList
.filter((c) => { .filter((c) => {
const matchesSearch = const matchesSearch =
c.name.toLowerCase().includes(searchText.toLowerCase()) || c.name.toLowerCase().includes(searchText.toLowerCase()) ||
@ -90,7 +90,7 @@ const Directory = () => {
return matchesSearch && matchesCategory; return matchesSearch && matchesCategory;
}) })
.sort((a, b) => a.name.localeCompare(b.name)); .sort((a, b) => a.name.localeCompare(b.name));
}, [contacts, searchText, selectedCategoryIds]); }, [ContatList, searchText, selectedCategoryIds]);
const { currentPage, totalPages, currentItems, paginate } = usePagination( const { currentPage, totalPages, currentItems, paginate } = usePagination(
filteredContacts, filteredContacts,
10 10