aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-05-24 14:04:02 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-05-24 14:04:02 -0700
commitb8958cda3485af46181e8a6091f12718acfb621c (patch)
tree9e3422d22e4ccbd71e0dfa4f608e155d57d28092
parente09f37e73b45a58c0a6ebf8ad8b5216c91713f26 (diff)
Fix tag lint issues
-rw-r--r--src/components/moments/TagFriendsFoooter.tsx35
-rw-r--r--src/screens/moments/TagFriendsScreen.tsx3
-rw-r--r--src/screens/profile/CaptionScreen.tsx35
-rw-r--r--src/screens/profile/IndividualMoment.tsx5
4 files changed, 39 insertions, 39 deletions
diff --git a/src/components/moments/TagFriendsFoooter.tsx b/src/components/moments/TagFriendsFoooter.tsx
index 6b8fc62a..7b109877 100644
--- a/src/components/moments/TagFriendsFoooter.tsx
+++ b/src/components/moments/TagFriendsFoooter.tsx
@@ -27,29 +27,23 @@ const TagFriendsFooter: React.FC<TagFriendsFooterProps> = ({
selectedUsers: taggedUsers,
})
}
- style={{
- flexDirection: 'column',
- alignItems: 'center',
- }}>
+ style={styles.tagMoreContainer}>
<Image
source={require('../../assets/icons/tagging/white-plus-icon.png')}
- style={{width: 38, height: 38, top: -2}}
+ style={styles.tagMoreIcon}
/>
- <Text style={styles.taggMoreLabel}>{'Tagg More'}</Text>
+ <Text style={styles.tagMoreLabel}>{'Tagg More'}</Text>
</TouchableOpacity>
);
const TaggedUser = (user: ProfilePreviewType) => (
- <View style={{flexDirection: 'row-reverse'}} key={user.id}>
+ <View style={styles.taggedUserContainer} key={user.id}>
<TouchableOpacity
style={styles.closeIconContainer}
onPress={() => handleRemoveTag(user)}>
<Image
source={require('../../assets/icons/tagging/x-icon.png')}
- style={{
- width: 20,
- height: 20,
- }}
+ style={styles.closeIcon}
/>
</TouchableOpacity>
<ProfilePreview
@@ -67,9 +61,7 @@ const TagFriendsFooter: React.FC<TagFriendsFooterProps> = ({
*/
const TagFriendsTitle = () => (
<TouchableOpacity
- style={{
- flexDirection: 'row',
- }}
+ style={styles.tagFriendsTitleContainer}
disabled={taggedUsers.length !== 0}
onPress={() =>
navigation.navigate('TagSelectionScreen', {
@@ -112,7 +104,7 @@ const styles = StyleSheet.create({
flexWrap: 'wrap',
justifyContent: 'flex-start',
},
- taggMoreLabel: {
+ tagMoreLabel: {
fontWeight: '500',
fontSize: normalize(9),
lineHeight: normalize(10),
@@ -127,6 +119,19 @@ const styles = StyleSheet.create({
right: -20,
zIndex: 1,
},
+ tagMoreContainer: {
+ flexDirection: 'column',
+ alignItems: 'center',
+ },
+ tagMoreIcon: {width: 38, height: 38, top: -2},
+ taggedUserContainer: {flexDirection: 'row-reverse'},
+ closeIcon: {
+ width: 20,
+ height: 20,
+ },
+ tagFriendsTitleContainer: {
+ flexDirection: 'row',
+ },
});
export default TagFriendsFooter;
diff --git a/src/screens/moments/TagFriendsScreen.tsx b/src/screens/moments/TagFriendsScreen.tsx
index e6a9f5fb..b0722efc 100644
--- a/src/screens/moments/TagFriendsScreen.tsx
+++ b/src/screens/moments/TagFriendsScreen.tsx
@@ -99,7 +99,7 @@ const TagFriendsScreen: React.FC<TagFriendsScreenProps> = ({route}) => {
}
/>
)}
- <View style={{marginHorizontal: '5%', marginTop: '3%'}}>
+ <View style={styles.footerContainer}>
<TagFriendsFooter
taggedUsers={taggedUsers}
setTaggedUsers={setTaggedUsers}
@@ -150,6 +150,7 @@ const styles = StyleSheet.create({
flex: {
flex: 1,
},
+ footerContainer: {marginHorizontal: '5%', marginTop: '3%'},
});
export default TagFriendsScreen;
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx
index 188ccc1f..43665428 100644
--- a/src/screens/profile/CaptionScreen.tsx
+++ b/src/screens/profile/CaptionScreen.tsx
@@ -176,28 +176,13 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
selectedUsers: taggedUsers,
})
}
- style={{
- marginHorizontal: '5%',
- marginTop: '3%',
- flexDirection: 'row',
- justifyContent: 'space-between',
- alignItems: 'center',
- }}>
+ style={styles.tagFriendsContainer}>
<Image
source={require('../../assets/icons/tagging/tag-icon.png')}
- style={{width: 20, height: 20}}
+ style={styles.tagIcon}
/>
<Text style={styles.tagFriendsTitle}>Tag Friends</Text>
- <Text
- numberOfLines={1}
- style={{
- color: 'white',
- width: 150,
- fontSize: normalize(10),
- lineHeight: normalize(11),
- letterSpacing: normalize(0.3),
- textAlign: 'right',
- }}>
+ <Text numberOfLines={1} style={styles.taggedListContainer}>
{taggedList}
{taggedList.length > 21 ? '. . .' : ''}
</Text>
@@ -255,9 +240,21 @@ const styles = StyleSheet.create({
fontWeight: '600',
},
tagFriendsContainer: {
- flexDirection: 'row',
+ marginHorizontal: '5%',
marginTop: '3%',
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ },
+ taggedListContainer: {
+ color: 'white',
+ width: 150,
+ fontSize: normalize(10),
+ lineHeight: normalize(11),
+ letterSpacing: normalize(0.3),
+ textAlign: 'right',
},
+ tagIcon: {width: 20, height: 20},
});
export default CaptionScreen;
diff --git a/src/screens/profile/IndividualMoment.tsx b/src/screens/profile/IndividualMoment.tsx
index 4baca5b2..515cbacf 100644
--- a/src/screens/profile/IndividualMoment.tsx
+++ b/src/screens/profile/IndividualMoment.tsx
@@ -1,17 +1,14 @@
-import AsyncStorage from '@react-native-community/async-storage';
import {BlurView} from '@react-native-community/blur';
import {RouteProp} from '@react-navigation/native';
import {StackNavigationProp} from '@react-navigation/stack';
import React from 'react';
-import {Alert, FlatList, StyleSheet, View} from 'react-native';
+import {FlatList, StyleSheet, View} from 'react-native';
import {useSelector} from 'react-redux';
import {
IndividualMomentTitleBar,
MomentPostContent,
MomentPostHeader,
} from '../../components';
-import {MOMENT_TAGS_ENDPOINT} from '../../constants';
-import {ERROR_SOMETHING_WENT_WRONG_REFRESH} from '../../constants/strings';
import {MainStackParams} from '../../routes';
import {RootState} from '../../store/rootreducer';
import {MomentType} from '../../types';