From 4f37038df45ee1aea6d42933ffa79f70a0a426d2 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Mon, 10 May 2021 15:17:45 -0400 Subject: added basic type, added like/unlike handler --- src/components/comments/CommentTile.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/components/comments/CommentTile.tsx') diff --git a/src/components/comments/CommentTile.tsx b/src/components/comments/CommentTile.tsx index cc847885..8074a015 100644 --- a/src/components/comments/CommentTile.tsx +++ b/src/components/comments/CommentTile.tsx @@ -11,7 +11,11 @@ import Trash from '../../assets/ionicons/trash-outline.svg'; import {TAGG_LIGHT_BLUE} from '../../constants'; import {ERROR_FAILED_TO_DELETE_COMMENT} from '../../constants/strings'; import {CommentContext} from '../../screens/profile/MomentCommentsScreen'; -import {deleteComment, getCommentsCount} from '../../services'; +import { + deleteComment, + getCommentsCount, + handleLikeUnlikeComment, +} from '../../services'; import {RootState} from '../../store/rootReducer'; import { CommentThreadType, @@ -145,7 +149,11 @@ const CommentTile: React.FC = ({ previewType={'Comment'} screenType={screenType} /> - {}} style={styles.likeButton} /> + handleLikeUnlikeComment(commentObject)} + style={styles.likeButton} + /> {renderTextWithMentions({ @@ -162,7 +170,9 @@ const CommentTile: React.FC = ({ {}}> - 999 + + {commentObject.reaction_count} + Likes {/* Show replies text only if there are some replies present */} -- cgit v1.2.3-70-g09d2