ordering-ui-react-native 0.12.34 → 0.12.38
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 +1 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +6 -5
- package/themes/business/src/components/OrderDetails/Business.tsx +2 -4
- package/themes/business/src/components/OrderDetails/Delivery.tsx +111 -108
- package/themes/business/src/types/index.tsx +3 -3
- package/themes/single-business/src/components/BusinessBasicInformation/index.tsx +1 -1
- package/themes/single-business/src/components/BusinessProductsListing/index.tsx +9 -8
- package/themes/single-business/src/components/BusinessesListing/index.tsx +307 -296
- package/themes/single-business/src/components/BusinessesListing/styles.tsx +41 -14
- package/themes/single-business/src/components/HelpAccountAndPayment/index.tsx +7 -6
- package/themes/single-business/src/components/HelpGuide/index.tsx +7 -6
- package/themes/single-business/src/components/HelpOrder/index.tsx +7 -6
- package/themes/single-business/src/components/LanguageSelector/index.tsx +87 -70
- package/themes/single-business/src/components/LoginForm/index.tsx +2 -2
- package/themes/single-business/src/components/OrderDetails/index.tsx +21 -21
- package/themes/single-business/src/components/ProductForm/index.tsx +682 -656
- package/themes/single-business/src/components/ProductForm/styles.tsx +1 -1
- package/themes/single-business/src/components/UserProfile/index.tsx +2 -2
- package/themes/single-business/src/components/shared/OIconButton.tsx +2 -2
- package/themes/single-business/src/components/shared/OInput.tsx +1 -0
- package/themes/single-business/src/components/shared/OLink.tsx +80 -0
- package/themes/single-business/src/components/shared/index.tsx +2 -0
- package/themes/single-business/src/types/index.tsx +3 -0
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
View,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
ScrollView,
|
|
7
|
+
Platform,
|
|
8
|
+
TouchableOpacity,
|
|
9
9
|
} from 'react-native';
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
BusinessList as BusinessesListingController,
|
|
12
|
+
useLanguage,
|
|
13
|
+
useSession,
|
|
14
|
+
useOrder,
|
|
15
|
+
useConfig,
|
|
16
|
+
useUtils,
|
|
17
17
|
} from 'ordering-components/native';
|
|
18
18
|
import { useTheme } from 'styled-components/native';
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
Search,
|
|
22
|
+
OrderControlContainer,
|
|
23
|
+
AddressInput,
|
|
24
|
+
WrapMomentOption,
|
|
25
|
+
HeaderWrapper,
|
|
26
|
+
ListWrapper,
|
|
27
|
+
FeaturedWrapper,
|
|
28
|
+
TopHeader,
|
|
29
|
+
DropOptionButton,
|
|
30
|
+
WrapSearchBar,
|
|
28
31
|
} from './styles';
|
|
29
32
|
|
|
30
33
|
import { SearchBar } from '../SearchBar';
|
|
31
|
-
import { OIcon, OText } from '../shared';
|
|
34
|
+
import { OButton, OIcon, OText } from '../shared';
|
|
32
35
|
import { BusinessesListingParams } from '../../types';
|
|
33
36
|
import { NotFoundSource } from '../NotFoundSource';
|
|
34
37
|
import { BusinessTypeFilter } from '../BusinessTypeFilter';
|
|
@@ -36,302 +39,310 @@ import { BusinessController } from '../BusinessController';
|
|
|
36
39
|
import { OrderTypeSelector } from '../OrderTypeSelector';
|
|
37
40
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
38
41
|
import { BusinessFeaturedController } from '../BusinessFeaturedController';
|
|
42
|
+
import { getTypesText } from '../../utils';
|
|
43
|
+
import NavBar from '../NavBar';
|
|
39
44
|
|
|
40
45
|
const PIXELS_TO_SCROLL = 1000;
|
|
41
46
|
|
|
42
47
|
const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
const {
|
|
49
|
+
navigation,
|
|
50
|
+
businessesList,
|
|
51
|
+
searchValue,
|
|
52
|
+
getBusinesses,
|
|
53
|
+
handleChangeBusinessType,
|
|
54
|
+
handleBusinessClick,
|
|
55
|
+
paginationProps,
|
|
56
|
+
handleChangeSearch,
|
|
57
|
+
} = props;
|
|
53
58
|
|
|
54
|
-
|
|
59
|
+
const theme = useTheme();
|
|
55
60
|
|
|
56
61
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
62
|
+
const styles = StyleSheet.create({
|
|
63
|
+
container: {
|
|
64
|
+
marginBottom: 0,
|
|
65
|
+
},
|
|
66
|
+
welcome: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
},
|
|
70
|
+
inputStyle: {
|
|
71
|
+
backgroundColor: theme.colors.inputDisabled,
|
|
72
|
+
flex: 1,
|
|
73
|
+
},
|
|
74
|
+
wrapperOrderOptions: {
|
|
75
|
+
width: '100%',
|
|
76
|
+
flexDirection: 'row',
|
|
77
|
+
justifyContent: 'flex-start',
|
|
78
|
+
marginBottom: 10,
|
|
79
|
+
zIndex: 100,
|
|
80
|
+
},
|
|
81
|
+
borderStyle: {
|
|
82
|
+
borderColor: theme.colors.backgroundGray,
|
|
83
|
+
borderWidth: 1,
|
|
84
|
+
borderRadius: 10,
|
|
85
|
+
},
|
|
86
|
+
searchInput: {
|
|
87
|
+
fontSize: 12,
|
|
88
|
+
},
|
|
89
|
+
btnBackArrow: {
|
|
90
|
+
borderWidth: 0,
|
|
91
|
+
backgroundColor: theme.colors.clear,
|
|
92
|
+
shadowColor: theme.colors.clear,
|
|
93
|
+
paddingLeft: 40,
|
|
94
|
+
paddingRight: 40
|
|
95
|
+
},
|
|
96
|
+
headerStyle: {
|
|
97
|
+
height: 260,
|
|
98
|
+
paddingHorizontal: 40
|
|
99
|
+
},
|
|
100
|
+
});
|
|
85
101
|
|
|
86
102
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
103
|
+
const [, t] = useLanguage();
|
|
104
|
+
const [{ user, auth }] = useSession();
|
|
105
|
+
const [orderState] = useOrder();
|
|
106
|
+
const [{ configs }] = useConfig();
|
|
107
|
+
const [{ parseDate }] = useUtils();
|
|
92
108
|
|
|
93
|
-
|
|
109
|
+
const { top } = useSafeAreaInsets();
|
|
94
110
|
|
|
95
|
-
|
|
111
|
+
const [featuredBusiness, setFeaturedBusinesses] = useState(Array);
|
|
96
112
|
|
|
97
|
-
|
|
98
|
-
// const panResponder = useRef(
|
|
99
|
-
// PanResponder.create({
|
|
100
|
-
// onMoveShouldSetPanResponder: (e, gestureState) => {
|
|
101
|
-
// const {dx, dy} = gestureState;
|
|
102
|
-
// resetInactivityTimeout()
|
|
103
|
-
// return (Math.abs(dx) > 20) || (Math.abs(dy) > 20);
|
|
104
|
-
// },
|
|
105
|
-
// })
|
|
106
|
-
// ).current
|
|
113
|
+
const configTypes = configs?.order_types_allowed?.value.split('|').map((value: any) => Number(value)) || [];
|
|
107
114
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
115
|
+
const handleScroll = ({ nativeEvent }: any) => {
|
|
116
|
+
const y = nativeEvent.contentOffset.y;
|
|
117
|
+
const height = nativeEvent.contentSize.height;
|
|
118
|
+
const hasMore = !(
|
|
119
|
+
paginationProps.totalPages === paginationProps.currentPage
|
|
120
|
+
);
|
|
112
121
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
paginationProps.totalPages === paginationProps.currentPage
|
|
118
|
-
);
|
|
122
|
+
if (y + PIXELS_TO_SCROLL > height && !businessesList.loading && hasMore) {
|
|
123
|
+
getBusinesses();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
119
126
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
if (businessesList.businesses.length > 0) {
|
|
129
|
+
const fb = businessesList.businesses.filter((b) => b.featured == true);
|
|
130
|
+
const ary = [];
|
|
131
|
+
while (fb.length > 0) {
|
|
132
|
+
ary.push(fb.splice(0, 2));
|
|
133
|
+
}
|
|
134
|
+
setFeaturedBusinesses(ary);
|
|
135
|
+
}
|
|
136
|
+
}, [businessesList.businesses]);
|
|
124
137
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
return (
|
|
139
|
+
<ScrollView
|
|
140
|
+
style={styles.container}
|
|
141
|
+
onScroll={(e) => handleScroll(e)}
|
|
142
|
+
showsVerticalScrollIndicator={false}
|
|
143
|
+
>
|
|
144
|
+
<HeaderWrapper
|
|
145
|
+
source={theme.images.backgrounds.business_list_header}
|
|
146
|
+
>
|
|
147
|
+
{!auth && (
|
|
148
|
+
<TopHeader style={{ top: top }}>
|
|
149
|
+
<NavBar
|
|
150
|
+
style={{ paddingBottom: 0, marginLeft: 20, backgroundColor: 'transparent' }}
|
|
151
|
+
btnStyle={{ backgroundColor: 'transparent' }}
|
|
152
|
+
leftImageStyle={{ tintColor: theme.colors.white }}
|
|
153
|
+
onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
|
|
154
|
+
/>
|
|
155
|
+
</TopHeader>
|
|
156
|
+
)}
|
|
141
157
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
</>
|
|
323
|
-
)}
|
|
324
|
-
</ListWrapper>
|
|
325
|
-
</ScrollView>
|
|
326
|
-
);
|
|
158
|
+
<AddressInput
|
|
159
|
+
onPress={() => auth
|
|
160
|
+
? navigation.navigate('AddressList', { isFromBusinesses: true })
|
|
161
|
+
: navigation.navigate('AddressForm', {
|
|
162
|
+
address: orderState.options?.address,
|
|
163
|
+
isFromBusinesses: true,
|
|
164
|
+
})
|
|
165
|
+
}
|
|
166
|
+
style={{ marginTop: !auth ? 36 : top > 0 ? 0 : 20 }}
|
|
167
|
+
activeOpacity={0.8}
|
|
168
|
+
>
|
|
169
|
+
<OIcon src={theme.images.general.pin} width={16} color={theme.colors.textSecondary} />
|
|
170
|
+
<OText color={theme.colors.textPrimary} numberOfLines={1} lineHeight={20} weight={Platform.OS === 'android' ? 'bold' : '600'} style={{ paddingStart: 10, flexBasis: '90%' }}>
|
|
171
|
+
{orderState?.options?.address?.address}
|
|
172
|
+
</OText>
|
|
173
|
+
</AddressInput>
|
|
174
|
+
<OrderControlContainer>
|
|
175
|
+
<View style={styles.wrapperOrderOptions}>
|
|
176
|
+
<DropOptionButton
|
|
177
|
+
activeOpacity={0.7}
|
|
178
|
+
onPress={() => navigation.navigate('OrderTypes', { configTypes: configTypes })}
|
|
179
|
+
>
|
|
180
|
+
<OText
|
|
181
|
+
size={12}
|
|
182
|
+
numberOfLines={1}
|
|
183
|
+
ellipsizeMode={'tail'}
|
|
184
|
+
color={theme.colors.textSecondary}
|
|
185
|
+
>
|
|
186
|
+
{t(getTypesText(orderState?.options?.type || 1), 'Delivery')}
|
|
187
|
+
</OText>
|
|
188
|
+
<OIcon
|
|
189
|
+
src={theme.images.general.arrow_down}
|
|
190
|
+
width={10}
|
|
191
|
+
style={{ marginStart: 8 }}
|
|
192
|
+
/>
|
|
193
|
+
</DropOptionButton>
|
|
194
|
+
<DropOptionButton
|
|
195
|
+
onPress={() => navigation.navigate('MomentOption')}>
|
|
196
|
+
<OText
|
|
197
|
+
size={12}
|
|
198
|
+
numberOfLines={1}
|
|
199
|
+
ellipsizeMode="tail"
|
|
200
|
+
color={theme.colors.textSecondary}>
|
|
201
|
+
{orderState.options?.moment
|
|
202
|
+
? parseDate(orderState.options?.moment, {
|
|
203
|
+
outputFormat:
|
|
204
|
+
configs?.format_time?.value === '12'
|
|
205
|
+
? 'MM/DD hh:mma'
|
|
206
|
+
: 'MM/DD HH:mm',
|
|
207
|
+
})
|
|
208
|
+
: t('ASAP_ABBREVIATION', 'ASAP')}
|
|
209
|
+
</OText>
|
|
210
|
+
<OIcon
|
|
211
|
+
src={theme.images.general.arrow_down}
|
|
212
|
+
width={10}
|
|
213
|
+
style={{ marginStart: 8 }}
|
|
214
|
+
/>
|
|
215
|
+
</DropOptionButton>
|
|
216
|
+
</View>
|
|
217
|
+
</OrderControlContainer>
|
|
218
|
+
</HeaderWrapper>
|
|
219
|
+
<WrapSearchBar>
|
|
220
|
+
<SearchBar
|
|
221
|
+
onSearch={handleChangeSearch}
|
|
222
|
+
isCancelXButtonShow
|
|
223
|
+
noBorderShow
|
|
224
|
+
placeholder={t('SEARCH', 'Search')}
|
|
225
|
+
lazyLoad
|
|
226
|
+
/>
|
|
227
|
+
</WrapSearchBar>
|
|
228
|
+
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
|
|
229
|
+
{featuredBusiness && featuredBusiness.length > 0 && (
|
|
230
|
+
<FeaturedWrapper>
|
|
231
|
+
<OText size={16} style={{ marginLeft: 40 }} weight={Platform.OS === 'ios' ? '600' : 'bold'}>{t('FEATURED_BUSINESS', 'Featured business')}</OText>
|
|
232
|
+
<ScrollView
|
|
233
|
+
showsHorizontalScrollIndicator={false}
|
|
234
|
+
nestedScrollEnabled
|
|
235
|
+
horizontal contentContainerStyle={{ paddingHorizontal: 40 }}>
|
|
236
|
+
{featuredBusiness.map((bAry: any, idx) => (
|
|
237
|
+
<View key={'f-listing_' + idx}>
|
|
238
|
+
<BusinessFeaturedController
|
|
239
|
+
key={bAry[0].id}
|
|
240
|
+
business={bAry[0]}
|
|
241
|
+
handleCustomClick={handleBusinessClick}
|
|
242
|
+
orderType={orderState?.options?.type}
|
|
243
|
+
/>
|
|
244
|
+
{bAry.length > 1 && (
|
|
245
|
+
<BusinessFeaturedController
|
|
246
|
+
key={bAry[1].id}
|
|
247
|
+
business={bAry[1]}
|
|
248
|
+
handleCustomClick={handleBusinessClick}
|
|
249
|
+
orderType={orderState?.options?.type}
|
|
250
|
+
/>
|
|
251
|
+
)}
|
|
252
|
+
</View>
|
|
253
|
+
))}
|
|
254
|
+
</ScrollView>
|
|
255
|
+
</FeaturedWrapper>
|
|
256
|
+
)}
|
|
257
|
+
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
|
|
258
|
+
<ListWrapper>
|
|
259
|
+
<BusinessTypeFilter
|
|
260
|
+
images={props.images}
|
|
261
|
+
businessTypes={props.businessTypes}
|
|
262
|
+
defaultBusinessType={props.defaultBusinessType}
|
|
263
|
+
handleChangeBusinessType={handleChangeBusinessType}
|
|
264
|
+
/>
|
|
265
|
+
{!businessesList.loading && businessesList.businesses.length === 0 && (
|
|
266
|
+
<NotFoundSource
|
|
267
|
+
content={t(
|
|
268
|
+
'NOT_FOUND_BUSINESSES',
|
|
269
|
+
'No businesses to delivery / pick up at this address, please change filters or change address.',
|
|
270
|
+
)}
|
|
271
|
+
/>
|
|
272
|
+
)}
|
|
273
|
+
{businessesList.businesses?.map(
|
|
274
|
+
(business: any) =>
|
|
275
|
+
!business.featured && (
|
|
276
|
+
<BusinessController
|
|
277
|
+
key={business.id}
|
|
278
|
+
business={business}
|
|
279
|
+
handleCustomClick={handleBusinessClick}
|
|
280
|
+
orderType={orderState?.options?.type}
|
|
281
|
+
/>
|
|
282
|
+
),
|
|
283
|
+
)}
|
|
284
|
+
{businessesList.loading && (
|
|
285
|
+
<>
|
|
286
|
+
{[
|
|
287
|
+
...Array(
|
|
288
|
+
paginationProps.nextPageItems
|
|
289
|
+
? paginationProps.nextPageItems
|
|
290
|
+
: 8,
|
|
291
|
+
).keys(),
|
|
292
|
+
].map((item, i) => (
|
|
293
|
+
<Placeholder
|
|
294
|
+
Animation={Fade}
|
|
295
|
+
key={i}
|
|
296
|
+
style={{ marginBottom: 20 }}>
|
|
297
|
+
<View style={{ width: '100%' }}>
|
|
298
|
+
<PlaceholderLine
|
|
299
|
+
height={200}
|
|
300
|
+
style={{ marginBottom: 20, borderRadius: 25 }}
|
|
301
|
+
/>
|
|
302
|
+
<View style={{ paddingHorizontal: 10 }}>
|
|
303
|
+
<View
|
|
304
|
+
style={{
|
|
305
|
+
flexDirection: 'row',
|
|
306
|
+
justifyContent: 'space-between',
|
|
307
|
+
}}>
|
|
308
|
+
<PlaceholderLine
|
|
309
|
+
height={25}
|
|
310
|
+
width={40}
|
|
311
|
+
style={{ marginBottom: 10 }}
|
|
312
|
+
/>
|
|
313
|
+
<PlaceholderLine
|
|
314
|
+
height={25}
|
|
315
|
+
width={20}
|
|
316
|
+
style={{ marginBottom: 10 }}
|
|
317
|
+
/>
|
|
318
|
+
</View>
|
|
319
|
+
<PlaceholderLine
|
|
320
|
+
height={20}
|
|
321
|
+
width={30}
|
|
322
|
+
style={{ marginBottom: 10 }}
|
|
323
|
+
/>
|
|
324
|
+
<PlaceholderLine
|
|
325
|
+
height={20}
|
|
326
|
+
width={80}
|
|
327
|
+
style={{ marginBottom: 10 }}
|
|
328
|
+
/>
|
|
329
|
+
</View>
|
|
330
|
+
</View>
|
|
331
|
+
</Placeholder>
|
|
332
|
+
))}
|
|
333
|
+
</>
|
|
334
|
+
)}
|
|
335
|
+
</ListWrapper>
|
|
336
|
+
</ScrollView>
|
|
337
|
+
);
|
|
327
338
|
};
|
|
328
339
|
|
|
329
340
|
export const BusinessesListing = (props: BusinessesListingParams) => {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
341
|
+
const BusinessesListingProps = {
|
|
342
|
+
...props,
|
|
343
|
+
isForceSearch: Platform.OS === 'ios',
|
|
344
|
+
UIComponent: BusinessesListingUI,
|
|
345
|
+
};
|
|
335
346
|
|
|
336
|
-
|
|
347
|
+
return <BusinessesListingController {...BusinessesListingProps} />;
|
|
337
348
|
};
|