Skip to content

Commit

Permalink
feat: 참여한 투표 인원 표시
Browse files Browse the repository at this point in the history
  • Loading branch information
Leejha committed Oct 16, 2023
1 parent 7835f70 commit e0919c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions apps/jurumarble/src/app/search/components/ChipContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ interface Props {
region: string;
mutateBookMark: UseMutateFunction;
isBookmark: boolean;
votedCount: number;
}

const ChipContainer = ({ date, title, region, mutateBookMark, isBookmark }: Props) => {
const ChipContainer = ({ date, title, region, mutateBookMark, isBookmark, votedCount }: Props) => {
return (
<>
<TagRow>
<FlexRow>
{region && <Chip variant="region">{region}</Chip>}
<Chip variant="numberOfParticipants">122명이 즐겼어요</Chip>
<Chip variant="numberOfParticipants">{votedCount}명이 즐겼어요</Chip>
</FlexRow>
<FlexRow>
{isBookmark ? (
Expand Down
3 changes: 2 additions & 1 deletion apps/jurumarble/src/app/search/components/DrinkVoteItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface Props {
* @Todo 타입 더 깔끔하게 정의 필요
*/
function DrinkVoteItem({ voteDrink }: Props) {
const { voteId, region, title, imageA, imageB } = voteDrink;
const { voteId, region, title, imageA, imageB, votedCount } = voteDrink;

const { isBookmark, mutateBookMark } = useBookmarkService(voteId);

Expand All @@ -31,6 +31,7 @@ function DrinkVoteItem({ voteDrink }: Props) {
region={region}
mutateBookMark={mutateBookMark}
isBookmark={isBookmark}
votedCount={votedCount}
/>
<VoteDescription imageA={imageA} imageB={imageB} />
</Container>
Expand Down

0 comments on commit e0919c5

Please sign in to comment.