Skip to content

Commit cee1c1f

Browse files
authored
Merge pull request #61137 from nkdengineer/fix/59556
fix: inconsistent bottom bar and search button in not found page
2 parents fad7b54 + cd381d0 commit cee1c1f

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

src/components/BlockingViews/FullPageNotFoundView.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type {StyleProp, TextStyle} from 'react-native';
44
import HeaderWithBackButton from '@components/HeaderWithBackButton';
55
import * as Illustrations from '@components/Icon/Illustrations';
66
import useLocalize from '@hooks/useLocalize';
7+
import useResponsiveLayout from '@hooks/useResponsiveLayout';
78
import useThemeStyles from '@hooks/useThemeStyles';
89
import StatsCounter from '@libs/actions/StatsCounter';
910
import Navigation from '@libs/Navigation/Navigation';
@@ -78,6 +79,7 @@ function FullPageNotFoundView({
7879
addOfflineIndicatorBottomSafeAreaPadding = addBottomSafeAreaPadding,
7980
}: FullPageNotFoundViewProps) {
8081
const styles = useThemeStyles();
82+
const {isMediumScreenWidth, isLargeScreenWidth} = useResponsiveLayout();
8183
const {translate} = useLocalize();
8284

8385
if (shouldShow) {
@@ -87,7 +89,7 @@ function FullPageNotFoundView({
8789
<HeaderWithBackButton
8890
onBackButtonPress={onBackButtonPress}
8991
shouldShowBackButton={shouldShowBackButton}
90-
shouldDisplaySearchRouter={shouldDisplaySearchRouter}
92+
shouldDisplaySearchRouter={shouldDisplaySearchRouter && (isMediumScreenWidth || isLargeScreenWidth)}
9193
/>
9294
<View
9395
style={[styles.flex1, styles.blockingViewContainer]}

src/pages/home/ReportScreen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -758,12 +758,12 @@ function ReportScreen({route, navigation}: ReportScreenProps) {
758758
shouldShow={shouldShowNotFoundPage}
759759
subtitleKey={shouldShowNotFoundLinkedAction ? '' : 'notFound.noAccess'}
760760
subtitleStyle={[styles.textSupporting]}
761-
shouldDisplaySearchRouter
762761
shouldShowBackButton={shouldUseNarrowLayout}
763762
onBackButtonPress={shouldShowNotFoundLinkedAction ? navigateToEndOfReport : Navigation.goBack}
764763
shouldShowLink={shouldShowNotFoundLinkedAction}
765764
linkKey="notFound.noAccess"
766765
onLinkPress={navigateToEndOfReport}
766+
shouldDisplaySearchRouter
767767
>
768768
<OfflineWithFeedback
769769
pendingAction={reportPendingAction}

src/pages/workspace/WorkspaceInitialPage.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
439439
shouldShow={shouldShowNotFoundPage}
440440
subtitleKey={shouldShowPolicy ? 'workspace.common.notAuthorized' : undefined}
441441
addBottomSafeAreaPadding
442+
shouldForceFullScreen
443+
shouldDisplaySearchRouter
442444
>
443445
<HeaderWithBackButton
444446
title={policyName}

src/pages/workspace/WorkspacePageWithSections.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ function WorkspacePageWithSections({
201201
shouldShow={shouldShow}
202202
subtitleKey={shouldShowPolicy ? 'workspace.common.notAuthorized' : undefined}
203203
shouldForceFullScreen
204+
shouldDisplaySearchRouter
204205
>
205206
<HeaderWithBackButton
206207
title={headerText}

0 commit comments

Comments
 (0)