Skip to content

Commit

Permalink
Merge pull request #43884 from bernhardoj/fix/43556-missing-offline-i…
Browse files Browse the repository at this point in the history
…ndicator

Fix search page missing offline indicator on web and offline indicator appears below card on small screen
  • Loading branch information
Beamanator authored Jun 19, 2024
2 parents 340f221 + 6a81e1d commit c11ae2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/Search/SearchPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as Illustrations from '@components/Icon/Illustrations';
import ScreenWrapper from '@components/ScreenWrapper';
import Search from '@components/Search';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import Navigation from '@libs/Navigation/Navigation';
import type {CentralPaneNavigatorParamList} from '@libs/Navigation/types';
Expand All @@ -20,6 +21,7 @@ type SearchPageProps = StackScreenProps<CentralPaneNavigatorParamList, typeof SC
function SearchPage({route}: SearchPageProps) {
const {translate} = useLocalize();
const {isSmallScreenWidth} = useWindowDimensions();
const styles = useThemeStyles();

const {query: rawQuery, policyIDs, sortBy, sortOrder} = route?.params ?? {};

Expand All @@ -42,7 +44,11 @@ function SearchPage({route}: SearchPageProps) {
}

return (
<ScreenWrapper testID={Search.displayName}>
<ScreenWrapper
testID={Search.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
>
<FullPageNotFoundView
shouldForceFullScreen
shouldShow={!isValidQuery}
Expand Down
1 change: 1 addition & 0 deletions src/pages/Search/SearchPageBottomTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function SearchPageBottomTab() {
<ScreenWrapper
testID={SearchPageBottomTab.displayName}
style={styles.pv0}
offlineIndicatorStyle={styles.mtAuto}
>
<FullPageNotFoundView
shouldShow={!isValidQuery}
Expand Down

0 comments on commit c11ae2f

Please sign in to comment.