Skip to content

Commit d8afcad

Browse files
committed
fix offlineIndicatorStyle
1 parent fabaf63 commit d8afcad

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/pages/Search/SearchPageWide.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, {useMemo} from 'react';
22
import type {NativeScrollEvent, NativeSyntheticEvent} from 'react-native';
33
import {View} from 'react-native';
44
import type {OnyxEntry} from 'react-native-onyx';
@@ -72,6 +72,14 @@ function SearchPageWide({
7272
const theme = useTheme();
7373
const {translate} = useLocalize();
7474

75+
const offlineIndicatorStyle = useMemo(() => {
76+
if (shouldShowFooter) {
77+
return [styles.mtAuto, styles.pAbsolute, styles.h10, styles.b0];
78+
}
79+
80+
return [styles.mtAuto];
81+
}, [shouldShowFooter, styles]);
82+
7583
const expensifyIcons = useMemoizedLazyExpensifyIcons(['SmartScan'] as const);
7684
const handleOnBackButtonPress = () => Navigation.goBack(ROUTES.SEARCH_ROOT.getRoute({query: buildCannedSearchQuery()}));
7785

@@ -82,6 +90,7 @@ function SearchPageWide({
8290
shouldEnableMaxHeight
8391
headerGapStyles={[styles.searchHeaderGap, styles.h0]}
8492
shouldShowOfflineIndicatorInWideScreen={!!searchResults}
93+
offlineIndicatorStyle={offlineIndicatorStyle}
8594
>
8695
<FullPageNotFoundView
8796
shouldForceFullScreen

0 commit comments

Comments
 (0)