From 5d5cb7830061661a83d9ee30a24727104212f789 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Thu, 17 Jun 2021 23:01:42 -0700 Subject: Add comment count component --- src/components/comments/CommentsCount.tsx | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/components/comments/CommentsCount.tsx (limited to 'src/components/comments') diff --git a/src/components/comments/CommentsCount.tsx b/src/components/comments/CommentsCount.tsx new file mode 100644 index 00000000..cb30fe76 --- /dev/null +++ b/src/components/comments/CommentsCount.tsx @@ -0,0 +1,47 @@ +import {useNavigation} from '@react-navigation/core'; +import React from 'react'; +import {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 {normalize} from '../../utils'; + +interface CommentsCountProps { + moment: MomentPostType; + screenType: ScreenType; +} + +const CommentsCount: React.FC = ({moment, screenType}) => { + const navigation = useNavigation(); + return ( + + navigation.navigate('MomentCommentsScreen', { + moment_id: moment.moment_id, + screenType, + }) + }> + + + {moment.comments_count} + + + ); +}; + +export default CommentsCount; -- cgit v1.2.3-70-g09d2