Skip to content

Commit

Permalink
refactor: 좋아요, 북마크 버튼 클릭 시 조회수 요청 안하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hae-on committed Oct 6, 2023
1 parent 638c4e1 commit 534801a
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 534801a

Please sign in to comment.