Skip to content

Commit

Permalink
Merge pull request #25164 from GItGudRatio/fix/24391-full-page-not-found
Browse files Browse the repository at this point in the history
fix: always show go back to home screen link on FullPageNotFoundView
  • Loading branch information
marcaaron authored Aug 18, 2023
2 parents 4de6fd7 + 87ea677 commit 68ac7c9
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/BlockingViews/BlockingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const propTypes = {
const defaultProps = {
iconColor: themeColors.offline,
subtitle: '',
shouldShowLink: false,
shouldShowLink: true,
link: 'notFound.goBackHome',
iconWidth: variables.iconSizeSuperLarge,
iconHeight: variables.iconSizeSuperLarge,
Expand Down
2 changes: 1 addition & 1 deletion src/components/BlockingViews/FullPageNotFoundView.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const defaultProps = {
subtitleKey: 'notFound.pageNotFound',
linkKey: 'notFound.goBackHome',
onBackButtonPress: Navigation.goBack,
shouldShowLink: false,
shouldShowLink: true,
shouldShowBackButton: true,
onLinkPress: () => Navigation.dismissModal(),
};
Expand Down
5 changes: 1 addition & 4 deletions src/pages/ErrorPage/NotFoundPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoun
function NotFoundPage() {
return (
<ScreenWrapper>
<FullPageNotFoundView
shouldShow
shouldShowLink
/>
<FullPageNotFoundView shouldShow />
</ScreenWrapper>
);
}
Expand Down
1 change: 0 additions & 1 deletion src/pages/ReimbursementAccount/ReimbursementAccountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ class ReimbursementAccountPage extends React.Component {
shouldShow
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)}
subtitleKey={_.isEmpty(this.props.policy) ? undefined : 'workspace.common.notAuthorized'}
shouldShowLink
/>
</ScreenWrapper>
);
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ class ReportScreen extends React.Component {
shouldShowCloseButton={false}
shouldShowBackButton={this.props.isSmallScreenWidth}
onBackButtonPress={Navigation.goBack}
shouldShowLink={false}
>
<OfflineWithFeedback
pendingAction={addWorkspaceRoomOrChatPendingAction}
Expand Down
1 change: 0 additions & 1 deletion src/pages/settings/Wallet/TransferBalancePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ function TransferBalancePage(props) {
shouldShow={!shouldShowTransferView}
titleKey="notFound.pageNotFound"
subtitleKey="transferAmountPage.notHereSubTitle"
shouldShowLink
linkKey="transferAmountPage.goToWallet"
onLinkPress={() => Navigation.goBack(ROUTES.SETTINGS_WALLET)}
>
Expand Down
1 change: 1 addition & 0 deletions src/pages/tasks/NewTaskPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ function NewTaskPage(props) {
<FullPageNotFoundView
shouldShow={!isAllowedToCreateTask}
onBackButtonPress={() => Task.dismissModalAndClearOutTaskInfo()}
shouldShowLink={false}
>
<HeaderWithBackButton
title={props.translate('newTaskPage.confirmTask')}
Expand Down

0 comments on commit 68ac7c9

Please sign in to comment.