@@ -37,13 +37,15 @@ import CONST from '@src/CONST';
3737import ONYXKEYS from '@src/ONYXKEYS' ;
3838import ROUTES from '@src/ROUTES' ;
3939import type { SearchResults } from '@src/types/onyx' ;
40+ import type { SearchResultsInfo } from '@src/types/onyx/SearchResults' ;
4041
4142const TOO_CLOSE_TO_TOP_DISTANCE = 10 ;
4243const TOO_CLOSE_TO_BOTTOM_DISTANCE = 10 ;
4344const ANIMATION_DURATION_IN_MS = 300 ;
4445
4546type SearchPageNarrowProps = {
4647 queryJSON ?: SearchQueryJSON ;
48+ metadata ?: SearchResultsInfo ;
4749 headerButtonsOptions : Array < DropdownOption < SearchHeaderOptionValue > > ;
4850 searchResults ?: SearchResults ;
4951 isMobileSelectionModeEnabled : boolean ;
@@ -54,7 +56,7 @@ type SearchPageNarrowProps = {
5456 } ;
5557} ;
5658
57- function SearchPageNarrow ( { queryJSON, headerButtonsOptions, searchResults, isMobileSelectionModeEnabled, footerData} : SearchPageNarrowProps ) {
59+ function SearchPageNarrow ( { queryJSON, headerButtonsOptions, searchResults, isMobileSelectionModeEnabled, metadata , footerData} : SearchPageNarrowProps ) {
5860 const { translate} = useLocalize ( ) ;
5961 const { shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
6062 const { windowHeight} = useWindowDimensions ( ) ;
@@ -147,7 +149,7 @@ function SearchPageNarrow({queryJSON, headerButtonsOptions, searchResults, isMob
147149 ) ;
148150 }
149151
150- const shouldShowFooter = ! ! footerData ?. count ;
152+ const shouldShowFooter = ! ! metadata ?. count ;
151153 const isDataLoaded = isSearchDataLoaded ( searchResults , queryJSON ) ;
152154 const shouldShowLoadingState = ! isOffline && ( ! isDataLoaded || ! ! currentSearchResults ?. search ?. isLoading ) ;
153155
0 commit comments