diff options
author | Ivan Chen <ivan@tagg.id> | 2021-06-24 17:41:45 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-06-24 17:41:45 -0400 |
commit | b184179a8bff25ad018d02abc31acadc7b3f6a62 (patch) | |
tree | efd94448ee76860156d7622a61e6eb8785c10f10 /src/components/moments/MomentCommentPreview.tsx | |
parent | 981051448fee6197544383e535fea7a72827d41d (diff) | |
parent | 53bdc94cf0491e348b7d4ad61e51ce1844423773 (diff) |
Merge branch 'master' into tma948-video-playback
# Conflicts:
# ios/Podfile.lock
# package.json
# src/components/moments/Moment.tsx
# src/routes/main/MainStackNavigator.tsx
# src/screens/moments/TagFriendsScreen.tsx
# src/screens/profile/CaptionScreen.tsx
# yarn.lock
Diffstat (limited to 'src/components/moments/MomentCommentPreview.tsx')
-rw-r--r-- | src/components/moments/MomentCommentPreview.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/moments/MomentCommentPreview.tsx b/src/components/moments/MomentCommentPreview.tsx index e53ed258..232568f1 100644 --- a/src/components/moments/MomentCommentPreview.tsx +++ b/src/components/moments/MomentCommentPreview.tsx @@ -23,7 +23,9 @@ const MomentCommentPreview: React.FC<MomentCommentPreviewProps> = ({ const navigation = useNavigation(); const state = useStore().getState(); const commentCountText = - commentsCount === 0 ? 'No Comments' : commentsCount + ' comments'; + !commentsCount || commentsCount === 0 + ? 'No Comments' + : commentsCount + ' comments'; return ( <TouchableOpacity @@ -35,7 +37,7 @@ const MomentCommentPreview: React.FC<MomentCommentPreviewProps> = ({ }) }> <Text style={styles.whiteBold}>{commentCountText}</Text> - {commentPreview !== null && ( + {commentPreview && ( <View style={styles.previewContainer}> <Image source={{ @@ -50,7 +52,7 @@ const MomentCommentPreview: React.FC<MomentCommentPreviewProps> = ({ {renderTextWithMentions({ value: commentPreview.comment, styles: styles.normalFont, - partTypes: mentionPartTypes('white'), + partTypes: mentionPartTypes('white', 'comment'), onPress: (user: UserType) => navigateToProfile( state, |