[HomePanel]SubCategory 부분 포커싱 이상건

- 의존성배열 추가 .
This commit is contained in:
junghoon86.park
2024-02-05 12:53:33 +09:00
parent e997dc640e
commit 54fee9815a

View File

@@ -43,7 +43,7 @@ const SubCategory = () => {
const initialLgCatCd = categoryInfos[0].lgCatCd;
setCurrentLgCatCd(initialLgCatCd);
}
}, []);
}, [categoryInfos]);
useEffect(() => {
if (currentLgCatCd) {
@@ -63,7 +63,7 @@ const SubCategory = () => {
<Container>
<CategoryNav
categoryInfos={categoryInfos}
currentLgCatCd={currentLgCatCd}
currentCategoryCode={currentLgCatCd}
onCategoryNavClick={handleCategoryNav}
type="home"
/>