aboutsummaryrefslogtreecommitdiff
path: root/src/components/comments
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-24 18:20:15 -0400
committerIvan Chen <ivan@tagg.id>2021-06-24 18:20:15 -0400
commit63bef47bffd2893f3013a02f71383c9c0a27881f (patch)
treeaa8f034273badad46b3bb9b5be78ddb60a5e9bcc /src/components/comments
parent9d32d737b2d2dc4044a7ec61a1be0411045c520a (diff)
Fix moment comment count, Add video support
Diffstat (limited to 'src/components/comments')
-rw-r--r--src/components/comments/CommentsCount.tsx15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/components/comments/CommentsCount.tsx b/src/components/comments/CommentsCount.tsx
index 90514193..d4a93bdd 100644
--- a/src/components/comments/CommentsCount.tsx
+++ b/src/components/comments/CommentsCount.tsx
@@ -3,27 +3,32 @@ import React from 'react';
import {StyleSheet, Text} from 'react-native';
import {TouchableOpacity} from 'react-native-gesture-handler';
import CommentsIcon from '../../assets/icons/moment-comment-icon.svg';
-import {MomentPostType, ScreenType} from '../../types';
+import {ScreenType} from '../../types';
import {normalize} from '../../utils';
interface CommentsCountProps {
- moment: MomentPostType;
+ momentId: string;
+ count: number;
screenType: ScreenType;
}
-const CommentsCount: React.FC<CommentsCountProps> = ({moment, screenType}) => {
+const CommentsCount: React.FC<CommentsCountProps> = ({
+ momentId,
+ count,
+ screenType,
+}) => {
const navigation = useNavigation();
return (
<TouchableOpacity
style={styles.countContainer}
onPress={() =>
navigation.navigate('MomentCommentsScreen', {
- moment_id: moment.moment_id,
+ moment_id: momentId,
screenType,
})
}>
<CommentsIcon width={25} height={25} />
- <Text style={styles.count}>{moment.comments_count}</Text>
+ <Text style={styles.count}>{count}</Text>
</TouchableOpacity>
);
};