Skip to content

Commit d5aafe0

Browse files
committed
chore: add umami tracking for unliking and unbookmarking posts
1 parent fad1f1c commit d5aafe0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/components/Post/Actions/Like.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ const Like = ({ post, showCount }: LikeProps) => {
8383

8484
if (hasReacted) {
8585
decrement();
86+
umami.track("unlike_post");
8687
return await undoReaction({
8788
variables: {
8889
request: { post: post.id, reaction: PostReactionType.Upvote }

src/components/Post/Actions/Menu/Bookmark.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const Bookmark = ({ post }: BookmarkProps) => {
7878

7979
const handleToggleBookmark = async () => {
8080
if (hasBookmarked) {
81+
umami.track("unbookmark_post");
8182
return await undoBookmarkPost();
8283
}
8384

0 commit comments

Comments
 (0)