Skip to content

Commit

Permalink
Merge pull request #27876 from b4s36t4/fix/transition-on-request-page
Browse files Browse the repository at this point in the history
fix transition of profiles on request confirmation page
  • Loading branch information
neil-marcellini authored Sep 22, 2023
2 parents 0851888 + 0e2e9ef commit 136c364
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/pages/ProfilePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -143,6 +136,13 @@ 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);
}
}, [accountID, hasMinimumDetails]);

return (
<ScreenWrapper testID="ProfilePage">
<HeaderWithBackButton
Expand Down

0 comments on commit 136c364

Please sign in to comment.