From 8ed0b76529d4f176c89ad12330c909fef22697c8 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Thu, 21 Jan 2021 15:04:35 -0500 Subject: trim bio --- src/screens/profile/EditProfile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/screens/profile') diff --git a/src/screens/profile/EditProfile.tsx b/src/screens/profile/EditProfile.tsx index 3b3fa36e..c5ae8c6f 100644 --- a/src/screens/profile/EditProfile.tsx +++ b/src/screens/profile/EditProfile.tsx @@ -297,7 +297,7 @@ const EditProfile: React.FC = ({route, navigation}) => { if (form.bio) { if (form.isValidBio) { - request.append('biography', form.bio); + request.append('biography', form.bio.trim()); } else { setForm({...form, attemptedSubmit: false}); setTimeout(() => setForm({...form, attemptedSubmit: true})); -- cgit v1.2.3-70-g09d2 From 27af1338ae8e735c831659fab8e51b795b368be4 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Thu, 21 Jan 2021 16:16:07 -0500 Subject: linting --- src/components/profile/Content.tsx | 11 +---------- src/components/profile/ProfileHeader.tsx | 2 -- src/screens/profile/MomentCommentsScreen.tsx | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) (limited to 'src/screens/profile') diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index 82803a7a..a2bd3cf3 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -10,16 +10,7 @@ import { View, } from 'react-native'; import Animated from 'react-native-reanimated'; -import { - CategorySelectionScreenType, - FriendshipStatusType, - MomentCategoryType, - MomentType, - ProfilePreviewType, - ProfileType, - ScreenType, - UserType, -} from '../../types'; +import {CategorySelectionScreenType, MomentType, ScreenType} from '../../types'; import {COVER_HEIGHT, TAGG_TEXT_LIGHT_BLUE} from '../../constants'; import { fetchUserX, diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 8c7a3301..26bbbc90 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -3,10 +3,8 @@ import {StyleSheet, Text, View} from 'react-native'; import {useSelector} from 'react-redux'; import {UniversityIcon} from '.'; import {PROFILE_CUTOUT_TOP_Y} from '../../constants'; -import {NO_MOMENTS} from '../../store/initialStates'; import {RootState} from '../../store/rootreducer'; import {ScreenType} from '../../types'; -import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; import Avatar from './Avatar'; import FriendsCount from './FriendsCount'; import ProfileMoreInfoDrawer from './ProfileMoreInfoDrawer'; diff --git a/src/screens/profile/MomentCommentsScreen.tsx b/src/screens/profile/MomentCommentsScreen.tsx index ebe4da28..1d27929e 100644 --- a/src/screens/profile/MomentCommentsScreen.tsx +++ b/src/screens/profile/MomentCommentsScreen.tsx @@ -4,7 +4,7 @@ import {ProfileStackParams} from '../../routes/main'; import {CenteredView, CommentTile} from '../../components'; import {CommentType} from '../../types'; import {ScrollView, StyleSheet, Text, View} from 'react-native'; -import {SCREEN_WIDTH} from '../../utils/screenDimensions'; +import {SCREEN_WIDTH} from '../../utils'; import {Button} from 'react-native-elements'; import {AddComment} from '../../components/'; import {useEffect} from 'react'; -- cgit v1.2.3-70-g09d2 From cf420db54deb32be1e6bc4092eef105cc23d93e4 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 22 Jan 2021 18:31:55 -0500 Subject: fixed merge issue and addressed review --- src/components/profile/ProfileHeader.tsx | 9 +-------- src/screens/profile/MomentCommentsScreen.tsx | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'src/screens/profile') diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 7fc90257..7dad2a68 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -58,13 +58,8 @@ const ProfileHeader: React.FC = ({ )} - + @@ -101,8 +96,6 @@ const styles = StyleSheet.create({ fontWeight: '500', alignSelf: 'center', }, - friends: {}, - university: {}, friendsAndUniversity: { flexDirection: 'row', alignItems: 'center', diff --git a/src/screens/profile/MomentCommentsScreen.tsx b/src/screens/profile/MomentCommentsScreen.tsx index dee86e15..fa35a33b 100644 --- a/src/screens/profile/MomentCommentsScreen.tsx +++ b/src/screens/profile/MomentCommentsScreen.tsx @@ -13,8 +13,7 @@ import {AddComment} from '../../components/'; import {ProfileStackParams} from '../../routes/main'; import {logout} from '../../store/actions'; import {CommentType} from '../../types'; -import {SCREEN_WIDTH} from '../../utils'; -import {SCREEN_HEIGHT} from '../../utils/screenDimensions'; +import {SCREEN_WIDTH, SCREEN_HEIGHT} from '../../utils'; /** * Comments Screen for an image uploaded -- cgit v1.2.3-70-g09d2