From d408c139a9091002c85c597bbd6690e285f05e22 Mon Sep 17 00:00:00 2001 From: smadpro Date: Mon, 16 May 2022 03:53:46 +0430 Subject: [PATCH] [fix] profile issue --- src/components/pages/profile.js | 11 +++++------ src/requests.js | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/pages/profile.js b/src/components/pages/profile.js index 919035f..b4551cc 100644 --- a/src/components/pages/profile.js +++ b/src/components/pages/profile.js @@ -201,16 +201,16 @@ const ProfileJsx = ({ navigation }) => { "@user_instance", "@user_token", ]) - .then(([profilePair, notifPair, domainPair, tokenPair]) => { + .then(async([profilePair, notifPair, domainPair, tokenPair]) => { profile = JSON.parse(profilePair[1]); notifs = JSON.parse(notifPair[1]); domain = domainPair[1]; accessToken = JSON.parse(tokenPair[1]).access_token; - + return Promise.all([ - requests.fetchProfile(domain, profile.id), - requests.fetchAccountStatuses(domain, profile.id, accessToken), - requests.fetchFollowers(domain, profile.id, accessToken), + requests.fetchProfile(domain, profile.id,accessToken), + requests.fetchAccountStatuses(domain, profile.id, accessToken), + requests.fetchFollowers(domain, profile.id, accessToken), ]); }) .then(([latestProfile, posts, followers]) => { @@ -231,7 +231,6 @@ const ProfileJsx = ({ navigation }) => { <> { state.loaded ?