Skip to content

Commit

Permalink
fix/#105 : 타입 string,number 부분 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
moondda committed Jan 15, 2024
1 parent 198a1b7 commit aa562bd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/groupFeed/carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -17,8 +16,8 @@ import NextBtn from '../../../assets/svgs/groupTabNextBtnEnable.svg';
import NextBtnHover from '../../../assets/svgs/groupTabNextBtnHover.svg';

interface CategoryIdPropTypes {
activeCategoryId: string;
setActiveCategoryId: Dispatch<SetStateAction<string>>;
activeCategoryId: number;
setActiveCategoryId: Dispatch<SetStateAction<number>>;
groupId: string | undefined;
}

Expand All @@ -39,7 +38,7 @@ const Carousel = (props: CategoryIdPropTypes) => {
},
};

const handleCategoryClick = (categoryId: string) => {
const handleCategoryClick = (categoryId: number) => {
setActiveCategoryId(categoryId);
};

Expand All @@ -60,8 +59,8 @@ const Carousel = (props: CategoryIdPropTypes) => {
{groupFeedCategoryData?.map((topic) => (
<CarouselContainer
key={topic.topicId}
onClick={() => handleCategoryClick(topic.topicId)}
isActive={topic.topicId === activeCategoryId}
onClick={() => handleCategoryClick(Number(topic.topicId))}
isActive={Number(topic.topicId) === activeCategoryId}
>
{topic.topicName}
</CarouselContainer>
Expand Down

0 comments on commit aa562bd

Please sign in to comment.