Skip to content

Commit

Permalink
fix for goBack on ProfilePage and WorkspacesListPage
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgrzybowski committed Jan 31, 2024
1 parent 8401a04 commit 7860696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/ProfilePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`) : '';
Expand Down
3 changes: 2 additions & 1 deletion src/pages/workspace/WorkspacesListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function WorkspacesListPage({policies, allPolicyMembers, reimbursementAccount, r
<HeaderWithBackButton
title={translate('common.workspaces')}
shouldShowBackButton={isSmallScreenWidth}
onBackButtonPress={() => Navigation.goBack(ROUTES.ALL_SETTINGS)}
onBackButtonPress={() => Navigation.goBack()}
>
<Button
accessibilityLabel={translate('workspace.new.newWorkspace')}
Expand Down Expand Up @@ -363,6 +363,7 @@ function WorkspacesListPage({policies, allPolicyMembers, reimbursementAccount, r
<HeaderWithBackButton
title={translate('common.workspaces')}
shouldShowBackButton={isSmallScreenWidth}
onBackButtonPress={() => Navigation.goBack()}
>
<Button
accessibilityLabel={translate('workspace.new.newWorkspace')}
Expand Down

0 comments on commit 7860696

Please sign in to comment.