aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/store/actions/userX.ts27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/store/actions/userX.ts b/src/store/actions/userX.ts
index 6302eb3c..f32a4d8f 100644
--- a/src/store/actions/userX.ts
+++ b/src/store/actions/userX.ts
@@ -39,38 +39,15 @@ export const loadUserX = (
const token = await getTokenOrLogout(dispatch);
fetchUserProfile(userId, token).then((profile) => {
if (profile) {
- let {
- name,
- biography,
- website,
- birthday,
- gender,
- snapchat,
- tiktok,
- university_class,
- profile_completion_stage,
- suggested_people_linked,
- friendship_status,
- friendship_requester_id,
- } = profile.profile_info;
+ const birthday = profile.profile_info.birthday;
dispatch({
type: userXProfileFetched.type,
payload: {
screenType,
userId,
data: {
- name,
- biography,
- website,
+ ...profile.profile_info,
birthday: birthday && moment(birthday).format('YYYY-MM-DD'),
- gender,
- snapchat,
- tiktok,
- university_class,
- profile_completion_stage,
- suggested_people_linked,
- friendship_status,
- friendship_requester_id,
},
},
});