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