diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/comments/AddComment.tsx | 5 | ||||
-rw-r--r-- | src/components/common/FriendsButton.tsx | 8 | ||||
-rw-r--r-- | src/components/moments/TagFriendsFoooter.tsx | 35 | ||||
-rw-r--r-- | src/components/profile/Content.tsx | 8 | ||||
-rw-r--r-- | src/components/profile/ProfileBody.tsx | 8 | ||||
-rw-r--r-- | src/components/profile/PublicProfile.tsx | 5 |
6 files changed, 32 insertions, 37 deletions
diff --git a/src/components/comments/AddComment.tsx b/src/components/comments/AddComment.tsx index befaa8fe..b229d010 100644 --- a/src/components/comments/AddComment.tsx +++ b/src/components/comments/AddComment.tsx @@ -27,9 +27,8 @@ export interface AddCommentProps { } const AddComment: React.FC<AddCommentProps> = ({momentId, placeholderText}) => { - const {setShouldUpdateAllComments, commentTapped} = useContext( - CommentContext, - ); + const {setShouldUpdateAllComments, commentTapped} = + useContext(CommentContext); const [inReplyToMention, setInReplyToMention] = useState(''); const [comment, setComment] = useState(''); const [keyboardVisible, setKeyboardVisible] = useState(false); diff --git a/src/components/common/FriendsButton.tsx b/src/components/common/FriendsButton.tsx index ae901229..e7a1f8c7 100644 --- a/src/components/common/FriendsButton.tsx +++ b/src/components/common/FriendsButton.tsx @@ -31,11 +31,9 @@ const FriendsButton: React.FC<FriendsButtonProps> = ({ }) => { const dispatch = useDispatch(); - const { - user = NO_USER, - profile = NO_PROFILE, - } = useSelector((state: RootState) => - userXId ? state.userX[screenType][userXId] : state.user, + const {user = NO_USER, profile = NO_PROFILE} = useSelector( + (state: RootState) => + userXId ? state.userX[screenType][userXId] : state.user, ); const {user: loggedInUser = NO_USER} = useSelector( 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/components/profile/Content.tsx b/src/components/profile/Content.tsx index 8298dc9a..2d1002dd 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -38,11 +38,9 @@ interface ContentProps { } const Content: React.FC<ContentProps> = ({userXId, screenType}) => { const dispatch = useDispatch(); - const { - user = NO_USER, - profile = NO_PROFILE, - } = useSelector((state: RootState) => - userXId ? state.userX[screenType][userXId] : state.user, + const {user = NO_USER, profile = NO_PROFILE} = useSelector( + (state: RootState) => + userXId ? state.userX[screenType][userXId] : state.user, ); const {blockedUsers = EMPTY_PROFILE_PREVIEW_LIST} = useSelector( (state: RootState) => state.blocked, diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx index 7557de00..8743acfb 100644 --- a/src/components/profile/ProfileBody.tsx +++ b/src/components/profile/ProfileBody.tsx @@ -42,12 +42,8 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({ userXId ? state.userX[screenType][userXId] : state.user, ); - const { - biography, - website, - friendship_status, - friendship_requester_id, - } = profile; + const {biography, website, friendship_status, friendship_requester_id} = + profile; const {id, username, first_name, last_name} = getUserAsProfilePreviewType( user, diff --git a/src/components/profile/PublicProfile.tsx b/src/components/profile/PublicProfile.tsx index b8920351..8a80c56f 100644 --- a/src/components/profile/PublicProfile.tsx +++ b/src/components/profile/PublicProfile.tsx @@ -55,9 +55,8 @@ const PublicProfile: React.FC<ContentProps> = ({ const [isStageTwoPromptClosed, setIsStageTwoPromptClosed] = useState(false); const [isStageOnePromptClosed, setIsStageOnePromptClosed] = useState(false); - const [isStageThreePromptClosed, setIsStageThreePromptClosed] = useState( - false, - ); + const [isStageThreePromptClosed, setIsStageThreePromptClosed] = + useState(false); const move = (direction: 'up' | 'down', title: string) => { let categories = [...momentCategories]; |