Skip to content

Commit

Permalink
Merge pull request #1578 from woowacourse/fix/1577-views
Browse files Browse the repository at this point in the history
Fix/#1577 좋아요, 북마크 버튼 클릭 시 아티클 조회수 요청을 보내지 않도록 한다
  • Loading branch information
hae-on authored Oct 6, 2023
2 parents 638c4e1 + 534801a commit 4ccc01b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/components/Article/Article.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const Article = ({

const toggleBookmark: React.MouseEventHandler<HTMLButtonElement> = (e) => {
e.preventDefault();
e.stopPropagation();

bookmarkRef.current = !bookmarkRef.current;
setBookmark((prev) => !prev);
Expand All @@ -41,6 +42,7 @@ const Article = ({

const toggleLike: React.MouseEventHandler<HTMLButtonElement> = (e) => {
e.preventDefault();
e.stopPropagation();

likeRef.current = !likeRef.current;
setLike((prev) => !prev);
Expand Down

0 comments on commit 4ccc01b

Please sign in to comment.