diff options
author | Michael <michael.foiani@gmail.com> | 2021-07-02 14:45:18 -0400 |
---|---|---|
committer | Michael <michael.foiani@gmail.com> | 2021-07-02 14:45:18 -0400 |
commit | 0d95e094b6370f32f6214d74a87ca56ea6eb477e (patch) | |
tree | 9cb100002b07a2ccd2aecbdf727d1ddb33ca0df7 /src/components/comments/CommentsCount.tsx | |
parent | 643e7adcda3e5ae7aa3daeb86020f2e6f38d1448 (diff) | |
parent | fa9c527f85d23a38b45c7efc41ec4590597fa7a1 (diff) |
Merge master into this test branch.
Diffstat (limited to 'src/components/comments/CommentsCount.tsx')
-rw-r--r-- | src/components/comments/CommentsCount.tsx | 15 |
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> ); }; |