aboutsummaryrefslogtreecommitdiff
path: root/src/components/comments/CommentsCount.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-11 18:12:24 -0400
committerGitHub <noreply@github.com>2021-06-11 18:12:24 -0400
commit78f32c1400eff46d4c768b78fbaf672826c74285 (patch)
tree00e62c1821d4973d214fdd47f8293749972c1925 /src/components/comments/CommentsCount.tsx
parent4add0eed33032012fb945fb02a928aed426b9465 (diff)
parent24f79b9cb3456b3901155ed2e4c8fc66710b97b2 (diff)
Merge pull request #466 from IvanIFChen/tma904-moment-comment-revamp
[TMA-904] Moment Comment Revamp
Diffstat (limited to 'src/components/comments/CommentsCount.tsx')
-rw-r--r--src/components/comments/CommentsCount.tsx58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/components/comments/CommentsCount.tsx b/src/components/comments/CommentsCount.tsx
deleted file mode 100644
index f4f8197d..00000000
--- a/src/components/comments/CommentsCount.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import {useNavigation} from '@react-navigation/native';
-import * as React from 'react';
-import {StyleSheet, TouchableOpacity} from 'react-native';
-import {Text} from 'react-native-animatable';
-import CommentIcon from '../../assets/icons/moment-comment-icon.svg';
-import {ScreenType} from '../../types';
-
-/**
- * Provides a view for the comment icon and the comment count.
- * When the user clicks on this view, a new screen opens to display all the comments.
- */
-
-type CommentsCountProps = {
- commentsCount: string;
- momentId: string;
- screenType: ScreenType;
-};
-
-const CommentsCount: React.FC<CommentsCountProps> = ({
- commentsCount,
- momentId,
- screenType,
-}) => {
- const navigation = useNavigation();
- const navigateToCommentsScreen = async () => {
- navigation.push('MomentCommentsScreen', {
- moment_id: momentId,
- screenType,
- });
- };
- return (
- <>
- <TouchableOpacity onPress={navigateToCommentsScreen}>
- <CommentIcon style={styles.image} />
- <Text style={styles.count}>
- {commentsCount !== '0' ? commentsCount : ''}
- </Text>
- </TouchableOpacity>
- </>
- );
-};
-
-const styles = StyleSheet.create({
- image: {
- position: 'relative',
- width: 21,
- height: 21,
- },
- count: {
- position: 'relative',
- fontWeight: 'bold',
- color: 'white',
- paddingTop: '3%',
- textAlign: 'center',
- },
-});
-
-export default CommentsCount;