Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: always show go back to home screen link on FullPageNotFoundView #25164

Merged
merged 4 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,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