From 5dfe7c605b0d987ef2cd8077bcaefa0d4028f354 Mon Sep 17 00:00:00 2001 From: Vadym Pavlyk Date: Thu, 14 Nov 2024 15:45:02 +0200 Subject: [PATCH] Fixed using array index as key in lists (#2685) --- .../AddProfessionalCategoryModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/edit-profile/professional-info-tab/add-professional-category-modal/AddProfessionalCategoryModal.tsx b/src/containers/edit-profile/professional-info-tab/add-professional-category-modal/AddProfessionalCategoryModal.tsx index 18b28e7b4..023b19627 100644 --- a/src/containers/edit-profile/professional-info-tab/add-professional-category-modal/AddProfessionalCategoryModal.tsx +++ b/src/containers/edit-profile/professional-info-tab/add-professional-category-modal/AddProfessionalCategoryModal.tsx @@ -214,7 +214,7 @@ const AddProfessionalCategoryModal: FC = ({ disableOptions={data.subjects as Array>} handleChange={handleProfessionalSubjectChange(index)} handleSubjectDelete={() => handleSubjectDelete(subject._id || '')} - key={index} + key={subject._id} selectedCategory={data.category?._id || ''} subject={{ ...subject