aboutsummaryrefslogtreecommitdiff
path: root/src/components/comments/CommentsCount.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-07-01 17:32:12 -0400
committerGitHub <noreply@github.com>2021-07-01 17:32:12 -0400
commitfa9c527f85d23a38b45c7efc41ec4590597fa7a1 (patch)
tree164852b257ab961fb8d4a067189b85e0aadcc180 /src/components/comments/CommentsCount.tsx
parent66c974161b59f1e3570e2a4a42334fabc16c2129 (diff)
parentad2f052c6d2cd1b50cc01200597b5b79cb33082d (diff)
Merge pull request #472 from TaggiD-Inc/poc-video
[POC] PoC Video
Diffstat (limited to 'src/components/comments/CommentsCount.tsx')
-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>
);
};