ordering-ui-external 1.9.3 → 1.9.5

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.
Files changed (39) hide show
  1. package/_bundles/{0.ordering-ui.ea0875b41af5b7f1d809.js → 0.ordering-ui.55652fab015bca672f9d.js} +0 -0
  2. package/_bundles/{1.ordering-ui.ea0875b41af5b7f1d809.js → 1.ordering-ui.55652fab015bca672f9d.js} +0 -0
  3. package/_bundles/{2.ordering-ui.ea0875b41af5b7f1d809.js → 2.ordering-ui.55652fab015bca672f9d.js} +0 -0
  4. package/_bundles/{4.ordering-ui.ea0875b41af5b7f1d809.js → 4.ordering-ui.55652fab015bca672f9d.js} +0 -0
  5. package/_bundles/{5.ordering-ui.ea0875b41af5b7f1d809.js → 5.ordering-ui.55652fab015bca672f9d.js} +0 -0
  6. package/_bundles/{6.ordering-ui.ea0875b41af5b7f1d809.js → 6.ordering-ui.55652fab015bca672f9d.js} +0 -0
  7. package/_bundles/{7.ordering-ui.ea0875b41af5b7f1d809.js → 7.ordering-ui.55652fab015bca672f9d.js} +1 -1
  8. package/_bundles/{7.ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt → 7.ordering-ui.55652fab015bca672f9d.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.ea0875b41af5b7f1d809.js → 8.ordering-ui.55652fab015bca672f9d.js} +0 -0
  10. package/_bundles/{9.ordering-ui.ea0875b41af5b7f1d809.js → 9.ordering-ui.55652fab015bca672f9d.js} +0 -0
  11. package/_bundles/ordering-ui.55652fab015bca672f9d.js +2 -0
  12. package/_bundles/{ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt → ordering-ui.55652fab015bca672f9d.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessesListing/index.js +1 -3
  14. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +17 -2
  15. package/_modules/components/VerticalOrdersLayout/styles.js +1 -1
  16. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +14 -6
  17. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +24 -60
  18. package/_modules/themes/five/src/components/Cart/index.js +52 -96
  19. package/_modules/themes/five/src/components/CartContent/index.js +25 -72
  20. package/_modules/themes/five/src/components/MultiCheckout/index.js +2 -3
  21. package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +7 -1
  22. package/_modules/themes/five/src/components/OrdersOption/index.js +2 -1
  23. package/_modules/utils/index.js +136 -2
  24. package/package.json +2 -2
  25. package/src/components/BusinessesListing/index.js +1 -3
  26. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +13 -2
  27. package/src/components/VerticalOrdersLayout/styles.js +8 -0
  28. package/src/themes/five/src/components/BusinessListingSearch/index.js +4 -0
  29. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +218 -261
  30. package/src/themes/five/src/components/Cart/index.js +44 -54
  31. package/src/themes/five/src/components/CartContent/index.js +23 -41
  32. package/src/themes/five/src/components/MultiCheckout/index.js +1 -7
  33. package/src/themes/five/src/components/MultiOrdersDetails/index.js +19 -13
  34. package/src/themes/five/src/components/OrdersOption/index.js +2 -1
  35. package/src/utils/index.js +35 -1
  36. package/template/app.js +178 -65
  37. package/template/components/ListenPageChanges/index.js +1 -1
  38. package/template/pages/MultiCart/index.js +6 -0
  39. package/_bundles/ordering-ui.ea0875b41af5b7f1d809.js +0 -2
@@ -47,6 +47,7 @@ import Skeleton from 'react-loading-skeleton'
47
47
  import { AutoScroll } from '../../../AutoScroll'
48
48
  import { CitiesControl } from '../../../CitiesControl'
49
49
  import { OrderContextUI } from '../../../OrderContextUI'
50
+ import { OrdersSection } from './OrdersSection'
50
51
 
51
52
  const PIXELS_TO_SCROLL = 300
52
53
 
@@ -89,10 +90,12 @@ const BusinessesListingUI = (props) => {
89
90
  const hideCities = (theme?.business_listing_view?.components?.cities?.hidden || orderState?.options?.type !== 2) ?? true
90
91
  const hideSearch = theme?.business_listing_view?.components?.search?.hidden
91
92
  const hideFilter = theme?.business_listing_view?.components?.filter?.hidden || hideSearch
93
+ const hideHero = theme?.business_listing_view?.components?.business_hero?.hidden
94
+ const hidePreviousOrders = theme?.business_listing_view?.components?.previous_orders_block?.hidden
95
+ const hideHighestBusiness = theme?.business_listing_view?.components?.highest_rated_business_block?.hidden
92
96
  const hideSearchSection = hideCities && hideSearch && hideFilter
93
97
  const isAllCategoriesHidden = theme?.business_listing_view?.components?.categories?.hidden
94
- const businessesIds = isCustomLayout &&
95
- businessesList.businesses &&
98
+ const businessesIds = businessesList.businesses &&
96
99
  businessesList.businesses?.map(business => business.id)
97
100
  const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
98
101
 
@@ -176,44 +179,6 @@ const BusinessesListingUI = (props) => {
176
179
  setFavoriteIds([...new Set(ids)])
177
180
  }, [businessesList?.businesses?.length])
178
181
 
179
- const OrdersSection = ({ titleContent }) => {
180
- return (
181
- <>
182
- {isCustomLayout && onRedirectPage && (
183
- <>
184
- <OrdersOption
185
- horizontal
186
- isBusinessesPage
187
- onRedirectPage={onRedirectPage}
188
- titleContent={t('CARTS', 'Carts')}
189
- businessesIds={businessesIds}
190
- customArray={
191
- getCustomArray(orderState.carts)?.filter(cart => cart.products.length > 0)
192
- }
193
- isCustomLayout
194
- isBusinessesLoading={businessesList.loading}
195
- isCustomerMode={isCustomerMode}
196
- franchiseId={props.franchiseId}
197
- />
198
- <OrdersOption
199
- horizontal
200
- asDashboard
201
- isBusinessesPage
202
- businessesIds={businessesIds}
203
- onRedirectPage={onRedirectPage}
204
- userCustomerId={userCustomer?.id}
205
- isCustomLayout
206
- titleContent={titleContent}
207
- isBusinessesLoading={businessesList.loading}
208
- isCustomerMode={isCustomerMode}
209
- franchiseId={props.franchiseId}
210
- />
211
- </>
212
- )}
213
- </>
214
- )
215
- }
216
-
217
182
  if (logosLayout) {
218
183
  return (
219
184
  <BusinessLogosWrapper>
@@ -242,243 +207,235 @@ const BusinessesListingUI = (props) => {
242
207
  }
243
208
 
244
209
  return (
245
- <>
246
- {props.beforeElements?.map((BeforeElement, i) => (
247
- <React.Fragment key={i}>
248
- {BeforeElement}
249
- </React.Fragment>))}
250
- {props.beforeComponents?.map((BeforeComponent, i) => (
251
- <BeforeComponent key={i} {...props} />))}
252
- <BusinessContainer>
253
- {(windowSize.width < 576 || (configs?.business_listing_hide_image?.value !== '1' && !isChew)) && (
254
- <BusinessBanner>
255
- {windowSize.width < 576 && (
256
- <OrderContextUI isBusinessList />
257
- )}
258
- {(configs?.business_listing_hide_image?.value !== '1' && !isChew) && (
259
- <BusinessHeroImg
260
- bgimage={theme.images?.general?.businessHero}
261
- height={theme?.business_listing_view?.components?.business_hero?.style?.height}
262
- />
263
- )}
264
- </BusinessBanner>
265
- )}
266
- {!!Object.values(orderState?.carts)?.length && (
267
- <OrderProgress
268
- isChew={isChew}
269
- franchiseId={props.franchiseId}
270
- userCustomerId={userCustomer?.id}
271
- asDashboard={isCustomerMode}
272
- isCustomerMode={isCustomerMode}
273
- />
274
- )}
275
- {(configs?.business_listing_hide_image?.value !== '1' && isChew) && (
276
- <BusinessHeroImg
277
- bgimage={theme.images?.general?.businessHero}
278
- height={theme?.business_listing_view?.components?.business_hero?.style?.height}
279
- />
280
- )}
281
- {isCustomerMode && (
282
- <OrdersSection titleContent={t('PREVIOUS_ORDERS', 'Previous orders')} />
283
- )}
284
- {!isCustomerMode && !hideSearchSection && (
285
- <>
286
- <WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
287
- {!hideSearch && windowSize.width <= 1200 && (
288
- <SearchBar
289
- lazyLoad
290
- search={searchValue}
291
- isCustomLayout={isCustomLayout}
292
- placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
293
- onSearch={handleChangeSearch}
294
- handleCustomEnter={() => onRedirectPage({ page: 'business_search' })}
295
- />
296
- )}
297
- {!hideCities && citiesState?.cities?.length > 0 && (
298
- <Button color='primary' onClick={handleOpenCities}>
299
- {citiesState?.cities?.find(city => city?.id === orderState?.options?.city_id)?.name || t('SELECT_A_CITY', 'Select a city')}
300
- </Button>
301
- )}
302
- {!hideFilter && configs?.advanced_business_search_enabled?.value === '1' && (
303
- <FiFilter onClick={() => onRedirectPage({ page: 'business_search' })} />
304
- )}
305
- {isCustomLayout && (
306
- <FiMap onClick={toggleMap} />
307
- )}
308
- </WrapperSearch>
309
- {activeMap && (
310
- <BusinessesMap
311
- businessList={businessesList.businesses}
312
- userLocation={orderState?.options?.address?.location}
313
- setErrors={setMapErrors}
314
- />
315
- )}
316
- </>
317
- )}
318
- {!isChew && hasHighRatedBusiness && !props.franchiseId && (
319
- <HightestRatedWrapper>
320
- <Divider />
321
- <HighestRated
322
- handleClickAddress={handleClickAddress}
323
- setHasHighRatedBusiness={setHasHighRatedBusiness}
324
- onBusinessClick={onBusinessClick}
325
- isCustomerMode={isCustomerMode}
326
- favoriteIds={favoriteIds}
327
- setFavoriteIds={setFavoriteIds}
210
+ <BusinessContainer>
211
+ {(windowSize.width < 576 || (configs?.business_listing_hide_image?.value !== '1' && !isChew)) && (
212
+ <BusinessBanner>
213
+ {windowSize.width < 576 && (
214
+ <OrderContextUI isBusinessList />
215
+ )}
216
+ {(configs?.business_listing_hide_image?.value !== '1' && !isChew) && !hideHero && (
217
+ <BusinessHeroImg
218
+ bgimage={theme.images?.general?.businessHero}
219
+ height={theme?.business_listing_view?.components?.business_hero?.style?.height}
328
220
  />
329
- <Divider />
330
- </HightestRatedWrapper>
331
- )}
332
-
333
- <PageBanner position='web_business_listing' />
334
-
335
- {(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden) && (
336
- <BusinessTypeFilter
337
- images={props.images}
338
- businessTypes={props.businessTypes}
339
- defaultBusinessType={props.defaultBusinessType}
340
- handleChangeBusinessType={handleChangeBusinessType}
341
- />
342
- )}
343
- {isCustomerMode && (
344
- <SearchContainer>
345
- {isCustomLayout && (
346
- <BusinessesTitle isCustomerMode={isCustomerMode}>
347
- {t('BUSINESSES', 'Businesses')}
348
- </BusinessesTitle>
349
- )}
350
- <WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
221
+ )}
222
+ </BusinessBanner>
223
+ )}
224
+ {!!Object.values(orderState?.carts)?.length && (
225
+ <OrderProgress
226
+ isChew={isChew}
227
+ franchiseId={props.franchiseId}
228
+ userCustomerId={userCustomer?.id}
229
+ asDashboard={isCustomerMode}
230
+ isCustomerMode={isCustomerMode}
231
+ />
232
+ )}
233
+ {(configs?.business_listing_hide_image?.value !== '1' && isChew) && (
234
+ <BusinessHeroImg
235
+ bgimage={theme.images?.general?.businessHero}
236
+ height={theme?.business_listing_view?.components?.business_hero?.style?.height}
237
+ />
238
+ )}
239
+ {isCustomerMode && !hidePreviousOrders && !businessesList.loading && (
240
+ <OrdersSection
241
+ titleContent={t('PREVIOUS_ORDERS', 'Previous orders')}
242
+ onRedirectPage={onRedirectPage}
243
+ businessesIds={businessesIds}
244
+ getCustomArray={getCustomArray}
245
+ businessesList={businessesList}
246
+ isCustomerMode={isCustomerMode}
247
+ userCustomer={userCustomer}
248
+ />
249
+ )}
250
+ {!isCustomerMode && !hideSearchSection && (
251
+ <>
252
+ <WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
253
+ {!hideSearch && windowSize.width <= 1200 && (
351
254
  <SearchBar
352
255
  lazyLoad
353
256
  search={searchValue}
354
257
  isCustomLayout={isCustomLayout}
355
258
  placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
356
259
  onSearch={handleChangeSearch}
260
+ handleCustomEnter={() => onRedirectPage({ page: 'business_search' })}
357
261
  />
358
- {configs?.advanced_business_search_enabled?.value === '1' && (
359
- <FiFilter onClick={() => onRedirectPage({ page: 'business_search' })} />
360
- )}
361
- {isCustomLayout && (
362
- <FiMap onClick={toggleMap} />
363
- )}
364
- </WrapperSearch>
365
- </SearchContainer>
366
- )}
367
- {isCustomerMode && activeMap && (
368
- <BusinessesMap
369
- businessList={businessesList.businesses}
370
- userLocation={orderState?.options?.address?.location}
371
- setErrors={setMapErrors}
262
+ )}
263
+ {!hideCities && citiesState?.cities?.length > 0 && (
264
+ <Button color='primary' onClick={handleOpenCities}>
265
+ {citiesState?.cities?.find(city => city?.id === orderState?.options?.city_id)?.name || t('SELECT_A_CITY', 'Select a city')}
266
+ </Button>
267
+ )}
268
+ {!hideFilter && configs?.advanced_business_search_enabled?.value === '1' && (
269
+ <FiFilter onClick={() => onRedirectPage({ page: 'business_search' })} />
270
+ )}
271
+ {isCustomLayout && (
272
+ <FiMap onClick={toggleMap} />
273
+ )}
274
+ </WrapperSearch>
275
+ {activeMap && (
276
+ <BusinessesMap
277
+ businessList={businessesList.businesses}
278
+ userLocation={orderState?.options?.address?.location}
279
+ setErrors={setMapErrors}
280
+ />
281
+ )}
282
+ </>
283
+ )}
284
+ {!isChew && hasHighRatedBusiness && !props.franchiseId && !hideHighestBusiness && (
285
+ <HightestRatedWrapper>
286
+ <Divider />
287
+ <HighestRated
288
+ handleClickAddress={handleClickAddress}
289
+ setHasHighRatedBusiness={setHasHighRatedBusiness}
290
+ onBusinessClick={onBusinessClick}
291
+ isCustomerMode={isCustomerMode}
292
+ favoriteIds={favoriteIds}
293
+ setFavoriteIds={setFavoriteIds}
294
+ disabledCities
372
295
  />
373
- )}
374
- {!isCustomerMode && (
375
- <OrdersSection />
376
- )}
377
- <>
378
- {((!isCustomLayout && isCustomerMode && businessesList?.businesses?.length > 0) || isChew) && (
379
- <BusinessesTitle>
296
+ <Divider />
297
+ </HightestRatedWrapper>
298
+ )}
299
+
300
+ <PageBanner position='web_business_listing' />
301
+
302
+ {(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden) && (
303
+ <BusinessTypeFilter
304
+ images={props.images}
305
+ businessTypes={props.businessTypes}
306
+ defaultBusinessType={props.defaultBusinessType}
307
+ handleChangeBusinessType={handleChangeBusinessType}
308
+ />
309
+ )}
310
+ {isCustomerMode && (
311
+ <SearchContainer>
312
+ {isCustomLayout && (
313
+ <BusinessesTitle isCustomerMode={isCustomerMode}>
380
314
  {t('BUSINESSES', 'Businesses')}
381
315
  </BusinessesTitle>
382
316
  )}
317
+ <WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
318
+ <SearchBar
319
+ lazyLoad
320
+ search={searchValue}
321
+ isCustomLayout={isCustomLayout}
322
+ placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
323
+ onSearch={handleChangeSearch}
324
+ />
325
+ {configs?.advanced_business_search_enabled?.value === '1' && (
326
+ <FiFilter onClick={() => onRedirectPage({ page: 'business_search' })} />
327
+ )}
328
+ {isCustomLayout && (
329
+ <FiMap onClick={toggleMap} />
330
+ )}
331
+ </WrapperSearch>
332
+ </SearchContainer>
333
+ )}
334
+ {isCustomerMode && activeMap && (
335
+ <BusinessesMap
336
+ businessList={businessesList.businesses}
337
+ userLocation={orderState?.options?.address?.location}
338
+ setErrors={setMapErrors}
339
+ />
340
+ )}
341
+ <>
342
+ {((!isCustomLayout && isCustomerMode && businessesList?.businesses?.length > 0) || isChew) && (
343
+ <BusinessesTitle>
344
+ {t('BUSINESSES', 'Businesses')}
345
+ </BusinessesTitle>
346
+ )}
383
347
 
384
- <BusinessList>
385
- {
386
- !businessesList.loading && businessesList.businesses.length === 0 && (
387
- <NotFoundSource
388
- content={t('NOT_FOUND_BUSINESSES', 'No businesses to delivery / pick up at this address, please change filters or change address.')}
348
+ <BusinessList>
349
+ {
350
+ !businessesList.loading && businessesList.businesses.length === 0 && businessesList?.fetched && (
351
+ <NotFoundSource
352
+ content={t('NOT_FOUND_BUSINESSES', 'No businesses to delivery / pick up at this address, please change filters or change address.')}
353
+ >
354
+ <Button
355
+ outline
356
+ color='primary'
357
+ onClick={() => handleClickAddress()}
358
+ style={{ height: '44px' }}
389
359
  >
390
- <Button
391
- outline
392
- color='primary'
393
- onClick={() => handleClickAddress()}
394
- style={{ height: '44px' }}
395
- >
396
- {t('CHANGE_ADDRESS', 'Select other Address')}
397
- </Button>
398
- </NotFoundSource>
399
- )
400
- }
401
- {
402
- businessesList.businesses?.map((business) => (
403
- <BusinessController
404
- key={business.id}
405
- className='card'
406
- business={business}
407
- isBusinessOpen={business.open}
408
- handleCustomClick={handleBusinessClick}
409
- orderType={orderState?.options?.type}
410
- isCustomLayout={isCustomLayout}
411
- isCustomerMode={isCustomerMode}
412
- onPreorderBusiness={setPreorderBusiness}
413
- businessHeader={business?.header}
414
- businessFeatured={business?.featured}
415
- businessOffers={business?.offers}
416
- businessLogo={business?.logo}
417
- businessReviews={business?.reviews?.total}
418
- businessDeliveryPrice={business?.delivery_price}
419
- businessDeliveryTime={business?.delivery_time}
420
- businessPickupTime={business?.pickup_time}
421
- businessDistance={business?.distance}
422
- handleUpdateBusinessList={handleUpdateBusinessList}
423
- favoriteIds={favoriteIds}
424
- setFavoriteIds={setFavoriteIds}
425
- />
426
- ))
427
- }
428
- {businessesList.loading && (
429
- [...Array(paginationProps?.nextPageItems > 4 ? paginationProps.nextPageItems : 8).keys()].map(i => (
430
- <BusinessController
431
- key={i}
432
- className='card'
433
- business={{}}
434
- isSkeleton
435
- orderType={orderState?.options?.type}
436
- />
437
- ))
438
- )}
439
- </BusinessList>
440
- </>
441
- <Modal
442
- open={isPreorder}
443
- width='760px'
444
- onClose={() => handleClosePreorder()}
445
- >
446
- <BusinessPreorder
447
- business={preorderBusiness}
448
- handleClick={handleBusinessClick}
449
- showButton
450
- />
451
- </Modal>
452
- <Modal
453
- title={t('SELECT_A_STORE', 'Select a store')}
454
- open={modals.citiesOpen}
455
- width='70%'
360
+ {t('CHANGE_ADDRESS', 'Select other Address')}
361
+ </Button>
362
+ </NotFoundSource>
363
+ )
364
+ }
365
+ {
366
+ businessesList.businesses?.map((business) => (
367
+ <BusinessController
368
+ key={business.id}
369
+ className='card'
370
+ business={business}
371
+ isBusinessOpen={business.open}
372
+ handleCustomClick={handleBusinessClick}
373
+ orderType={orderState?.options?.type}
374
+ isCustomLayout={isCustomLayout}
375
+ isCustomerMode={isCustomerMode}
376
+ onPreorderBusiness={setPreorderBusiness}
377
+ businessHeader={business?.header}
378
+ businessFeatured={business?.featured}
379
+ businessOffers={business?.offers}
380
+ businessLogo={business?.logo}
381
+ businessReviews={business?.reviews?.total}
382
+ businessDeliveryPrice={business?.delivery_price}
383
+ businessDeliveryTime={business?.delivery_time}
384
+ businessPickupTime={business?.pickup_time}
385
+ businessDistance={business?.distance}
386
+ handleUpdateBusinessList={handleUpdateBusinessList}
387
+ favoriteIds={favoriteIds}
388
+ setFavoriteIds={setFavoriteIds}
389
+ />
390
+ ))
391
+ }
392
+ {(businessesList.loading || !businessesList?.fetched) && (
393
+ [...Array(paginationProps?.nextPageItems > 4 ? paginationProps.nextPageItems : 8).keys()].map(i => (
394
+ <BusinessController
395
+ key={i}
396
+ className='card'
397
+ business={{}}
398
+ isSkeleton
399
+ orderType={orderState?.options?.type}
400
+ />
401
+ ))
402
+ )}
403
+ </BusinessList>
404
+ </>
405
+ <Modal
406
+ open={isPreorder}
407
+ width='760px'
408
+ onClose={() => handleClosePreorder()}
409
+ >
410
+ <BusinessPreorder
411
+ business={preorderBusiness}
412
+ handleClick={handleBusinessClick}
413
+ showButton
414
+ />
415
+ </Modal>
416
+ <Modal
417
+ title={t('SELECT_A_STORE', 'Select a store')}
418
+ open={modals.citiesOpen}
419
+ width='70%'
420
+ onClose={() => setModals({ ...modals, citiesOpen: false })}
421
+ >
422
+ <CitiesControl
423
+ cities={citiesState?.cities}
424
+ handleChangeCity={handleChangeCity}
456
425
  onClose={() => setModals({ ...modals, citiesOpen: false })}
457
- >
458
- <CitiesControl
459
- cities={citiesState?.cities}
460
- handleChangeCity={handleChangeCity}
461
- onClose={() => setModals({ ...modals, citiesOpen: false })}
462
- />
463
- </Modal>
464
-
465
- <Alert
466
- title={!mapErrors ? t('SEARCH', 'Search') : t('BUSINESSES_MAP', 'Businesses Map')}
467
- content={alertState.content}
468
- acceptText={t('ACCEPT', 'Accept')}
469
- open={alertState.open}
470
- onClose={() => handleCloseAlerts()}
471
- onAccept={() => handleCloseAlerts()}
472
- closeOnBackdrop={false}
473
426
  />
474
- </BusinessContainer>
475
- {props.afterComponents?.map((AfterComponent, i) => (
476
- <AfterComponent key={i} {...props} />))}
477
- {props.afterElements?.map((AfterElement, i) => (
478
- <React.Fragment key={i}>
479
- {AfterElement}
480
- </React.Fragment>))}
481
- </>
427
+ </Modal>
428
+
429
+ <Alert
430
+ title={!mapErrors ? t('SEARCH', 'Search') : t('BUSINESSES_MAP', 'Businesses Map')}
431
+ content={alertState.content}
432
+ acceptText={t('ACCEPT', 'Accept')}
433
+ open={alertState.open}
434
+ onClose={() => handleCloseAlerts()}
435
+ onAccept={() => handleCloseAlerts()}
436
+ closeOnBackdrop={false}
437
+ />
438
+ </BusinessContainer>
482
439
  )
483
440
  }
484
441