diff --git a/src/containers/edit-profile/professional-info-tab/professional-category-list/ProfessionalCategoryList.tsx b/src/containers/edit-profile/professional-info-tab/professional-category-list/ProfessionalCategoryList.tsx index 714043ef7..b8394702d 100644 --- a/src/containers/edit-profile/professional-info-tab/professional-category-list/ProfessionalCategoryList.tsx +++ b/src/containers/edit-profile/professional-info-tab/professional-category-list/ProfessionalCategoryList.tsx @@ -15,13 +15,18 @@ const ProfessionalCategoryList: FC = ({ openProfessionalCategoryModal, handleDeleteCategory }) => { - const professionalCategoryItems = items.map((item) => { + const uniqueItems = items.filter( + (item, index, array) => + array.findIndex((i) => i.category._id === item.category._id) === index + ) + + const professionalCategoryItems = uniqueItems.map((item) => { const handleDelete = () => handleDeleteCategory(item._id, item.category._id) return ( )