From d2c124892602674963f28213e8fc632e622e1262 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=97=90=EC=9D=B4=EB=93=A0?=
<62369936+gyeongza@users.noreply.github.com>
Date: Thu, 3 Aug 2023 19:52:02 +0900
Subject: [PATCH] =?UTF-8?q?=EC=84=9C=ED=8F=AC=ED=84=B0=20=EC=84=A0?=
=?UTF-8?q?=ED=83=9D=20=ED=95=84=ED=84=B0=20=EA=B8=B0=EB=8A=A5=20useEffect?=
=?UTF-8?q?=20dependency=20=EC=88=98=EC=A0=95=20(#200)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: supporterId와 key값이 겹치는 오류 수정
* fix: 무한으로 useEffect가 호출되는 오류 수정
---
.../SupporterSelectItem/SupporterSelectItem.tsx | 4 ++--
.../SupporterSelectList/SupporterSelectList.tsx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/src/components/SupporterSelect/SupporterSelectItem/SupporterSelectItem.tsx b/frontend/src/components/SupporterSelect/SupporterSelectItem/SupporterSelectItem.tsx
index 6be197f6d..e95ef351a 100644
--- a/frontend/src/components/SupporterSelect/SupporterSelectItem/SupporterSelectItem.tsx
+++ b/frontend/src/components/SupporterSelect/SupporterSelectItem/SupporterSelectItem.tsx
@@ -44,8 +44,8 @@ const SupporterSelectItem = ({
{name}
{company}
- {technicalTags.map((tag, index) => (
-
+ {technicalTags.map((tag) => (
+
))}
diff --git a/frontend/src/components/SupporterSelect/SupporterSelectList/SupporterSelectList.tsx b/frontend/src/components/SupporterSelect/SupporterSelectList/SupporterSelectList.tsx
index 24b3b46e8..a662274c1 100644
--- a/frontend/src/components/SupporterSelect/SupporterSelectList/SupporterSelectList.tsx
+++ b/frontend/src/components/SupporterSelect/SupporterSelectList/SupporterSelectList.tsx
@@ -58,7 +58,7 @@ const SupporterSelectList = ({ handleSelectButton, selectedTechField }: Props) =
});
if (backend) setFilteredSupporter(backend);
}
- }, [filteredSupporter, supporterCardList]);
+ }, [supporterCardList, selectedTechField]);
const selectedSupporter = (selectedSupporter: SupporterCard) => {
handleSelectButton(selectedSupporter);