ordering-ui-react-native 0.23.94 → 0.23.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
|
1
|
+
import React, { useEffect, useMemo, useState } from 'react'
|
|
2
2
|
import { useLanguage, BusinessSearchList, useOrder, useUtils, useEvent, showToast, ToastType } from 'ordering-components/native'
|
|
3
3
|
import { ScrollView, StyleSheet, Dimensions, FlatList } from 'react-native'
|
|
4
4
|
import { useTheme } from 'styled-components/native'
|
|
@@ -164,10 +164,14 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
164
164
|
handleChangeTermValue('')
|
|
165
165
|
}, [isFocused])
|
|
166
166
|
|
|
167
|
+
const businessFiltered = useMemo(() => {
|
|
168
|
+
return businessesSearchList.businesses?.filter((business: any) => business?.categories?.length > 0)
|
|
169
|
+
}, [businessesSearchList.businesses])
|
|
170
|
+
|
|
167
171
|
return (
|
|
168
172
|
<>
|
|
169
173
|
<FlatList
|
|
170
|
-
data={
|
|
174
|
+
data={businessFiltered}
|
|
171
175
|
ListFooterComponent={<BusinessSearchFooter
|
|
172
176
|
businessesSearchList={businessesSearchList}
|
|
173
177
|
handleCloseFilters={handleCloseFilters}
|