Skip to content

Commit

Permalink
feat: 찜 카드 이벤트 전파 방지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
im-na0 committed Jun 27, 2024
1 parent 9315d37 commit 326e064
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/wishListPage/components/wishCard/LikeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const WishButton = ({ productId }: { productId: number }) => {

const { deleteWish } = useDeleteWishInfiniteMutation();

const handleToggleLike = () => {
const handleToggleLike = (e: React.MouseEvent) => {
e.stopPropagation();
setLiked((prev) => !prev);
if (liked) {
deleteWish(productId);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/wishListPage/components/wishCard/WishCard.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const CardContainer = styled.div`
padding-block: ${remCalc(24)};
padding-inline: ${remCalc(20)};
cursor: pointer;
`;

export const CardWrapper = styled.div`
Expand Down

0 comments on commit 326e064

Please sign in to comment.