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 search page missing offline indicator on web and offline indicator appears below card on small screen #43884

Merged
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
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
Loading