From 8b438b5931843c9bf31406aac1876954e215fc65 Mon Sep 17 00:00:00 2001 From: Mahesh Date: Wed, 20 Sep 2023 22:38:55 +0530 Subject: [PATCH 1/2] fix transition of profiles on request confirmation page --- src/pages/ProfilePage.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index b515da04b7be..47eb44de6f91 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -99,13 +99,6 @@ const getPhoneNumber = (details) => { function ProfilePage(props) { const accountID = Number(lodashGet(props.route.params, 'accountID', 0)); - // eslint-disable-next-line rulesdir/prefer-early-return - useEffect(() => { - if (ValidationUtils.isValidAccountRoute(accountID)) { - PersonalDetails.openPublicProfilePage(accountID); - } - }, [accountID]); - const details = lodashGet(props.personalDetails, accountID, ValidationUtils.isValidAccountRoute(accountID) ? {} : {isloading: false}); const displayName = details.displayName ? details.displayName : props.translate('common.hidden'); @@ -143,6 +136,12 @@ function ProfilePage(props) { const chatReportWithCurrentUser = !isCurrentUser && !Session.isAnonymousUser() ? ReportUtils.getChatByParticipants([accountID]) : 0; + useEffect(() => { + if (ValidationUtils.isValidAccountRoute(accountID) && !hasMinimumDetails) { + PersonalDetails.openPublicProfilePage(accountID); + } + }, [accountID, hasMinimumDetails]); + return ( Date: Wed, 20 Sep 2023 23:32:19 +0530 Subject: [PATCH 2/2] fix lint error --- src/pages/ProfilePage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index 47eb44de6f91..36fafa94d097 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -136,6 +136,7 @@ function ProfilePage(props) { const chatReportWithCurrentUser = !isCurrentUser && !Session.isAnonymousUser() ? ReportUtils.getChatByParticipants([accountID]) : 0; + // eslint-disable-next-line rulesdir/prefer-early-return useEffect(() => { if (ValidationUtils.isValidAccountRoute(accountID) && !hasMinimumDetails) { PersonalDetails.openPublicProfilePage(accountID);