Skip to content

Commit

Permalink
show offline indicator for search page central screen and put it at t…
Browse files Browse the repository at this point in the history
…he bottom
  • Loading branch information
bernhardoj committed Jun 18, 2024
1 parent b335423 commit 6a81e1d
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 6a81e1d

Please sign in to comment.