aboutsummaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2020-12-08 23:17:23 -0500
committerGitHub <noreply@github.com>2020-12-08 23:17:23 -0500
commit792115326fc6af583f422082537885bc8061d051 (patch)
treec397e80a5573cd791c45cc006b36570efa91d73c /src/services
parent84616a6143fea58899eafa915a73592eaad25361 (diff)
[TMA-410] Edit Non-Integrated Socials (#126)
* removed refs, added KB avoidance, UI done * missed some things * now parsing response correctly from backend * fixed naming * now allow empty strings to un-link a social * hide field if empty, allow empty string, fixed taggs bar not updating bug * Fix bug where non integrated socials do not show up on edit profile page Co-authored-by: Ashm Walia <40498934+ashmgarv@users.noreply.github.com> Co-authored-by: Ashm Walia <ashmwalia@outlook.com>
Diffstat (limited to 'src/services')
-rw-r--r--src/services/UserProfileService.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/services/UserProfileService.ts b/src/services/UserProfileService.ts
index e69e4103..c8dbcdd1 100644
--- a/src/services/UserProfileService.ts
+++ b/src/services/UserProfileService.ts
@@ -1,10 +1,8 @@
-//Abstracted common profile api calls out here
-
import AsyncStorage from '@react-native-community/async-storage';
import moment from 'moment';
import {Alert} from 'react-native';
import RNFetchBlob from 'rn-fetch-blob';
-import {SocialAccountType, MomentType} from 'src/types';
+import {SocialAccountType} from 'src/types';
import {
AVATAR_PHOTO_ENDPOINT,
COVER_PHOTO_ENDPOINT,
@@ -25,10 +23,9 @@ export const loadProfileInfo = async (token: string, userId: string) => {
const status = response.status;
if (status === 200) {
const info = await response.json();
- let {name, biography, website, birthday, gender} = info;
- // user should always have a birthday, but a safety check here
+ let {name, biography, website, birthday, gender, snapchat, tiktok} = info;
birthday = birthday && moment(birthday).format('YYYY-MM-DD');
- return {name, biography, website, birthday, gender};
+ return {name, biography, website, birthday, gender, snapchat, tiktok};
}
} catch (error) {
Alert.alert(