From 7860696cba7d465c404b30a17e0b9e8772e8eb4f Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Wed, 31 Jan 2024 18:01:18 +0100 Subject: [PATCH] fix for goBack on ProfilePage and WorkspacesListPage --- src/pages/ProfilePage.js | 2 +- src/pages/workspace/WorkspacesListPage.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index bf99b3ef0a45..11e2afeb6e95 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -133,7 +133,7 @@ function ProfilePage(props) { const hasStatus = !!statusEmojiCode; const statusContent = `${statusEmojiCode} ${statusText}`; - const navigateBackTo = lodashGet(props.route, 'params.backTo', ROUTES.HOME); + const navigateBackTo = lodashGet(props.route, 'params.backTo'); const shouldShowNotificationPreference = !_.isEmpty(props.report) && props.report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; const notificationPreference = shouldShowNotificationPreference ? props.translate(`notificationPreferencesPage.notificationPreferences.${props.report.notificationPreference}`) : ''; diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 9442ffafa862..5b499fe7a3ee 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -322,7 +322,7 @@ function WorkspacesListPage({policies, allPolicyMembers, reimbursementAccount, r Navigation.goBack(ROUTES.ALL_SETTINGS)} + onBackButtonPress={() => Navigation.goBack()} >