From 706a6c77971a10d8d45d1b3e189eadc28f89841e Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Tue, 22 Jun 2021 08:44:12 -0700 Subject: Fix lint errors --- src/components/comments/CommentsCount.tsx | 39 +++++++++++++------------ src/components/comments/ZoomInCropper.tsx | 3 +- src/components/moments/MomentPost.tsx | 4 +-- src/components/profile/MomentMoreInfoDrawer.tsx | 1 - 4 files changed, 24 insertions(+), 23 deletions(-) (limited to 'src/components') diff --git a/src/components/comments/CommentsCount.tsx b/src/components/comments/CommentsCount.tsx index cb30fe76..90514193 100644 --- a/src/components/comments/CommentsCount.tsx +++ b/src/components/comments/CommentsCount.tsx @@ -1,6 +1,6 @@ import {useNavigation} from '@react-navigation/core'; import React from 'react'; -import {Text} from 'react-native'; +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'; @@ -15,12 +15,7 @@ const CommentsCount: React.FC = ({moment, screenType}) => { const navigation = useNavigation(); return ( navigation.navigate('MomentCommentsScreen', { moment_id: moment.moment_id, @@ -28,20 +23,26 @@ const CommentsCount: React.FC = ({moment, screenType}) => { }) }> - - {moment.comments_count} - + {moment.comments_count} ); }; +const styles = StyleSheet.create({ + countContainer: { + minWidth: 50, + flexDirection: 'column', + justifyContent: 'center', + alignItems: 'center', + }, + count: { + fontWeight: '500', + fontSize: normalize(11), + lineHeight: normalize(13), + letterSpacing: normalize(0.05), + textAlign: 'center', + color: 'white', + marginTop: normalize(5), + }, +}); export default CommentsCount; diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx index f3fb5c05..25301e6a 100644 --- a/src/components/comments/ZoomInCropper.tsx +++ b/src/components/comments/ZoomInCropper.tsx @@ -130,7 +130,7 @@ export const ZoomInCropper: React.FC = ({ = ({ value: moment.caption, styles: styles.captionText, partTypes: mentionPartTypes('white'), - onPress: (user: UserType) => + onPress: (userLocal: UserType) => navigateToProfile( state, dispatch, navigation, screenType, - user, + userLocal, ), })} diff --git a/src/components/profile/MomentMoreInfoDrawer.tsx b/src/components/profile/MomentMoreInfoDrawer.tsx index a8adcfda..dc4ebe32 100644 --- a/src/components/profile/MomentMoreInfoDrawer.tsx +++ b/src/components/profile/MomentMoreInfoDrawer.tsx @@ -3,7 +3,6 @@ import React, {useEffect, useState} from 'react'; import { Alert, GestureResponderEvent, - StyleSheet, TextStyle, TouchableOpacity, ViewProps, -- cgit v1.2.3-70-g09d2