diff --git a/src/pages/groupFeed/carousel/Carousel.tsx b/src/pages/groupFeed/carousel/Carousel.tsx index ad0e4fbc..535b46f5 100644 --- a/src/pages/groupFeed/carousel/Carousel.tsx +++ b/src/pages/groupFeed/carousel/Carousel.tsx @@ -7,7 +7,6 @@ import './slick-theme.css'; import './slick.css'; import CarouselContainer from './CarouselContainer'; -import { CAROUSEL_CATEGORY } from '../constants/CAROUSEL_DATA'; import { useTopicList } from '../hooks/queries'; import { GroupTabBtnBaseBeforeIc, GroupTabBtnBaseNextIc } from '../../../assets/svgs'; @@ -17,8 +16,8 @@ import NextBtn from '../../../assets/svgs/groupTabNextBtnEnable.svg'; import NextBtnHover from '../../../assets/svgs/groupTabNextBtnHover.svg'; interface CategoryIdPropTypes { - activeCategoryId: string; - setActiveCategoryId: Dispatch>; + activeCategoryId: number; + setActiveCategoryId: Dispatch>; groupId: string | undefined; } @@ -39,7 +38,7 @@ const Carousel = (props: CategoryIdPropTypes) => { }, }; - const handleCategoryClick = (categoryId: string) => { + const handleCategoryClick = (categoryId: number) => { setActiveCategoryId(categoryId); }; @@ -60,8 +59,8 @@ const Carousel = (props: CategoryIdPropTypes) => { {groupFeedCategoryData?.map((topic) => ( handleCategoryClick(topic.topicId)} - isActive={topic.topicId === activeCategoryId} + onClick={() => handleCategoryClick(Number(topic.topicId))} + isActive={Number(topic.topicId) === activeCategoryId} > {topic.topicName}