diff options
author | Ivan Chen <ivan@tagg.id> | 2021-05-07 15:56:07 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-05-10 16:50:41 -0400 |
commit | f9cee23e41c76bf6a5d607ba0d772b65aab7c3f0 (patch) | |
tree | 9a66b7011e66fdb9c5a8649dd3a146cd062cd19b /src/components/comments/CommentTile.tsx | |
parent | a19514a3916a2dc2eab28a085866b34f2e9f2bc6 (diff) |
updated minor styling
Diffstat (limited to 'src/components/comments/CommentTile.tsx')
-rw-r--r-- | src/components/comments/CommentTile.tsx | 63 |
1 files changed, 29 insertions, 34 deletions
diff --git a/src/components/comments/CommentTile.tsx b/src/components/comments/CommentTile.tsx index f793cdbe..cc847885 100644 --- a/src/components/comments/CommentTile.tsx +++ b/src/components/comments/CommentTile.tsx @@ -19,12 +19,7 @@ import { ScreenType, UserType, } from '../../types'; -import { - getTimePosted, - navigateToProfile, - normalize, - SCREEN_WIDTH, -} from '../../utils'; +import {getTimePosted, navigateToProfile, normalize} from '../../utils'; import {mentionPartTypes, renderTextWithMentions} from '../../utils/comments'; import {LikeButton} from '../common'; import {ProfilePreview} from '../profile'; @@ -101,7 +96,7 @@ const CommentTile: React.FC<CommentTileProps> = ({ showReplies ? 'Hide' : comment.replies_count > 0 - ? `Replies (${comment.replies_count})` + ? `Replies (${comment.replies_count}) ` : 'Replies'; const renderRightAction = (text: string, color: string) => { @@ -166,32 +161,31 @@ const CommentTile: React.FC<CommentTileProps> = ({ <Text style={styles.date_time}>{' ' + timePosted}</Text> </View> <View style={styles.row}> - <Text style={[styles.date_time, styles.likeCount]}>5</Text> - <Text style={styles.date_time}>Likes</Text> - </View> - {/* Show replies text only if there are some replies present */} - {!isThread && (commentObject as CommentType).replies_count > 0 ? ( - <TouchableOpacity - style={styles.repliesTextAndIconContainer} - onPress={toggleReplies}> - <Text style={styles.repliesText}> - {getRepliesText(commentObject as CommentType)} - </Text> - <Arrow - width={12} - height={11} - color={TAGG_LIGHT_BLUE} - style={ - !showReplies - ? styles.repliesDownArrow - : styles.repliesUpArrow - } - /> + <TouchableOpacity style={styles.row} onPress={() => {}}> + <Text style={[styles.date_time, styles.likeCount]}>999</Text> + <Text style={styles.date_time}>Likes</Text> </TouchableOpacity> - ) : ( - // empty view for justify content's space-between - <View /> - )} + {/* Show replies text only if there are some replies present */} + {!isThread && (commentObject as CommentType).replies_count > 0 && ( + <TouchableOpacity + style={styles.repliesTextAndIconContainer} + onPress={toggleReplies}> + <Text style={styles.repliesText}> + {getRepliesText(commentObject as CommentType)} + </Text> + <Arrow + width={12} + height={11} + color={TAGG_LIGHT_BLUE} + style={ + !showReplies + ? styles.repliesDownArrow + : styles.repliesUpArrow + } + /> + </TouchableOpacity> + )} + </View> </View> </TouchableOpacity> </View> @@ -219,8 +213,8 @@ const styles = StyleSheet.create({ flexDirection: 'column', flex: 1, paddingTop: '3%', - marginLeft: '7%', - paddingBottom: 5, + marginLeft: '5%', + paddingBottom: '2%', }, swipeActions: { flexDirection: 'row', @@ -268,6 +262,7 @@ const styles = StyleSheet.create({ repliesTextAndIconContainer: { flexDirection: 'row', alignItems: 'center', + paddingLeft: 10, }, repliesText: { color: TAGG_LIGHT_BLUE, |