ordering-ui-react-native 0.12.5 → 0.12.9

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 (35) hide show
  1. package/package.json +1 -1
  2. package/src/components/BusinessBasicInformation/index.tsx +14 -8
  3. package/src/components/PreviousOrders/index.tsx +21 -9
  4. package/src/components/ProductItemAccordion/index.tsx +1 -1
  5. package/themes/instacart/src/components/BusinessProductsList/index.tsx +38 -30
  6. package/themes/instacart/src/components/BusinessProductsListing/index.tsx +44 -3
  7. package/themes/instacart/src/components/BusinessProductsListing/styles.tsx +1 -1
  8. package/themes/instacart/src/types/index.tsx +1 -0
  9. package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +2 -2
  10. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +2 -2
  11. package/themes/kiosk/src/components/NavBar/index.tsx +3 -2
  12. package/themes/kiosk/src/components/OrderDetails/index.tsx +8 -2
  13. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +1 -1
  14. package/themes/single-business/index.tsx +4 -0
  15. package/themes/single-business/src/components/AddressForm/index.tsx +39 -44
  16. package/themes/single-business/src/components/BusinessInformation/styles.tsx +1 -1
  17. package/themes/single-business/src/components/Cart/index.tsx +301 -234
  18. package/themes/single-business/src/components/Cart/styles.tsx +34 -0
  19. package/themes/single-business/src/components/Messages/index.tsx +4 -4
  20. package/themes/single-business/src/components/Messages/styles.tsx +1 -1
  21. package/themes/single-business/src/components/PromotionCard/index.tsx +103 -0
  22. package/themes/single-business/src/components/PromotionCard/styles.tsx +28 -0
  23. package/themes/single-business/src/components/Promotions/index.tsx +78 -0
  24. package/themes/single-business/src/components/Promotions/styles.tsx +3 -0
  25. package/themes/single-business/src/components/UpsellingProducts/styles.tsx +2 -1
  26. package/themes/uber-eats/src/components/BusinessController/index.tsx +1 -1
  27. package/themes/uber-eats/src/components/BusinessProductsCategories/index.tsx +77 -9
  28. package/themes/uber-eats/src/components/BusinessProductsList/index.tsx +56 -10
  29. package/themes/uber-eats/src/components/BusinessProductsListing/index.tsx +50 -9
  30. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +4 -0
  31. package/themes/uber-eats/src/components/HighestRatedBusinesses/index.tsx +132 -0
  32. package/themes/uber-eats/src/components/HighestRatedBusinesses/styles.tsx +6 -0
  33. package/themes/uber-eats/src/components/Messages/index.tsx +1 -1
  34. package/themes/uber-eats/src/components/OrderDetails/index.tsx +4 -2
  35. package/themes/uber-eats/src/types/index.tsx +12 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.12.5",
3
+ "version": "0.12.9",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -2,7 +2,7 @@ import React, { useState } from 'react'
2
2
  import IconAntDesign from 'react-native-vector-icons/AntDesign'
3
3
  import IconEvilIcons from 'react-native-vector-icons/EvilIcons'
4
4
  import MaterialComIcon from 'react-native-vector-icons/MaterialCommunityIcons';
5
- import { StyleSheet, View, TouchableOpacity } from 'react-native'
5
+ import { StyleSheet, View, TouchableOpacity, ScrollView } from 'react-native'
6
6
  import { useUtils, useOrder, useLanguage } from 'ordering-components/native'
7
7
  import { useTheme } from 'styled-components/native';
8
8
 
@@ -84,14 +84,20 @@ export const BusinessBasicInformation = (props: BusinessBasicInformationParams)
84
84
  </Placeholder>
85
85
  ) : (
86
86
  <View style={{ maxWidth: '75%', justifyContent: 'flex-start' }}>
87
- <OText
88
- size={20}
89
- weight='bold'
90
- numberOfLines={1}
91
- ellipsizeMode='tail'
87
+ <ScrollView
88
+ showsVerticalScrollIndicator={false}
89
+ showsHorizontalScrollIndicator={false}
90
+ horizontal
92
91
  >
93
- {business?.name}
94
- </OText>
92
+ <OText
93
+ size={20}
94
+ weight='bold'
95
+ numberOfLines={1}
96
+ ellipsizeMode='tail'
97
+ >
98
+ {business?.name}
99
+ </OText>
100
+ </ScrollView>
95
101
  </View>
96
102
  )}
97
103
  {!isBusinessInfoShow && (
@@ -101,9 +101,15 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
101
101
  </Logo>
102
102
  )}
103
103
  <Information>
104
- <OText size={17} numberOfLines={1}>
105
- {order.business?.name}
106
- </OText>
104
+ <ScrollView
105
+ showsVerticalScrollIndicator={false}
106
+ showsHorizontalScrollIndicator={false}
107
+ horizontal
108
+ >
109
+ <OText size={17} >
110
+ {order.business?.name}
111
+ </OText>
112
+ </ScrollView>
107
113
  <OText size={15} color={theme.colors.textSecondary} numberOfLines={1}>
108
114
  {order?.delivery_datetime_utc ? parseDate(order?.delivery_datetime_utc) : parseDate(order?.delivery_datetime, { utc: false })}
109
115
  </OText>
@@ -120,13 +126,19 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
120
126
  </MyOrderOptions>
121
127
  </Information>
122
128
  <Status>
123
- <OText
124
- color={theme.colors.primary}
125
- size={16}
126
- numberOfLines={1}
129
+ <ScrollView
130
+ showsVerticalScrollIndicator={false}
131
+ showsHorizontalScrollIndicator={false}
132
+ horizontal
127
133
  >
128
- {getOrderStatus(order.status)?.value}
129
- </OText>
134
+ <OText
135
+ color={theme.colors.primary}
136
+ size={16}
137
+ numberOfLines={1}
138
+ >
139
+ {getOrderStatus(order.status)?.value}
140
+ </OText>
141
+ </ScrollView>
130
142
  <OButton
131
143
  text={t('REORDER', 'Reorder')}
132
144
  imgRightSrc={''}
@@ -213,7 +213,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
213
213
  </OText>
214
214
  )}
215
215
  </View>
216
- <View style={{ display: 'flex', flexDirection: 'column', flex: 1, alignItems: 'flex-end' }}>
216
+ <View style={{ display: 'flex', flexDirection: 'column', flex: 1, alignItems: 'flex-end', marginLeft: 10}}>
217
217
  {!isProductUnavailable && (
218
218
  <View style={{ flexDirection: 'row' }}>
219
219
  <OText size={18}>{parsePrice(product.total || product.price)}</OText>
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React, { useState, useEffect } from 'react'
2
2
  import { ProductsList, useLanguage } from 'ordering-components/native'
3
3
  import { SingleProductCard } from '../SingleProductCard'
4
4
  import { NotFoundSource } from '../NotFoundSource'
@@ -34,49 +34,57 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
34
34
 
35
35
  const [, t] = useLanguage()
36
36
  const theme = useTheme()
37
+ const [allProducts, setAllProducts] = useState([])
38
+
39
+ useEffect(() => {
40
+ if (category?.id) return
41
+ if (Array.isArray(categoryState?.products)) {
42
+ if (categoryState?.products.length > allProducts.length) {
43
+ setAllProducts(categoryState?.products.sort((a: any, b: any) => a.id - b.id))
44
+ }
45
+ }
46
+ }, [category, categoryState])
37
47
 
38
48
  return (
39
49
  <ProductsContainer>
40
- {category.id && (
41
- categoryState.products?.map((product: any) => (
50
+ {/* {category.id && (
51
+ categoryState.products?.map((product: any, index: number) => (
42
52
  <SingleProductCard
43
- key={product.id}
53
+ key={index}
44
54
  isSoldOut={(product.inventoried && !product.quantity)}
45
55
  product={product}
46
56
  businessId={businessId}
47
57
  onProductClick={() => onProductClick(product)}
48
58
  />
49
59
  ))
50
- )}
60
+ )} */}
51
61
 
52
62
  {
53
- !category.id && (
54
- featured && categoryState?.products?.find((product: any) => product.featured) && (
55
- <>
56
- <TouchableOpacity
57
- onPress={() => handlerClickCategory({ id: 'featured', name: 'Featured' })}
58
- >
59
- <OText style={{...theme.labels.subtitle, fontWeight: Platform.OS == 'ios' ? '600' : 'bold'}} mBottom={10}>{t('FEATURED', 'Featured')}</OText>
60
- </TouchableOpacity>
61
- <ScrollView horizontal showsHorizontalScrollIndicator={false}>
62
- {categoryState.products?.map((product: any) => product.featured && (
63
- <SingleProductCard
64
- key={product.id}
65
- isSoldOut={(product.inventoried && !product.quantity)}
66
- product={product}
67
- businessId={businessId}
68
- onProductClick={onProductClick}
69
- />
70
- ))}
71
- </ScrollView>
72
- </>
73
- )
63
+ featured && allProducts?.find((product: any) => product.featured) && (
64
+ <>
65
+ <TouchableOpacity
66
+ onPress={() => handlerClickCategory({ id: 'featured', name: 'Featured' })}
67
+ >
68
+ <OText style={{...theme.labels.subtitle, fontWeight: Platform.OS == 'ios' ? '600' : 'bold'}} mBottom={10}>{t('FEATURED', 'Featured')}</OText>
69
+ </TouchableOpacity>
70
+ <ScrollView horizontal showsHorizontalScrollIndicator={false}>
71
+ {allProducts?.map((product: any, index: number) => product.featured && (
72
+ <SingleProductCard
73
+ key={index}
74
+ isSoldOut={(product.inventoried && !product.quantity)}
75
+ product={product}
76
+ businessId={businessId}
77
+ onProductClick={onProductClick}
78
+ />
79
+ ))}
80
+ </ScrollView>
81
+ </>
74
82
  )
75
83
  }
76
84
 
77
85
  {
78
- !category.id && categories && categories.filter(category => category.id !== null).map((category, i, _categories) => {
79
- const products = categoryState.products?.filter((product: any) => product.category_id === category.id) || []
86
+ categories && categories.filter(category => category.id !== null).map((category, i, _categories) => {
87
+ const products = allProducts?.filter((product: any) => product.category_id === category.id) || []
80
88
  return (
81
89
  <View key={category.id} style={{alignItems: 'flex-start'}}>
82
90
  {
@@ -89,9 +97,9 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
89
97
  </TouchableOpacity>
90
98
  <ScrollView horizontal showsHorizontalScrollIndicator={false}>
91
99
  {
92
- products.map((product: any) => (
100
+ products.map((product: any, index: number) => (
93
101
  <SingleProductCard
94
- key={product.id}
102
+ key={index}
95
103
  isSoldOut={product.inventoried && !product.quantity}
96
104
  businessId={businessId}
97
105
  product={product}
@@ -6,7 +6,9 @@ import {
6
6
  useLanguage,
7
7
  useOrder,
8
8
  useSession,
9
- useUtils
9
+ useUtils,
10
+ useToast,
11
+ ToastType
10
12
  } from 'ordering-components/native'
11
13
  import { OButton, OModal, OText } from '../shared'
12
14
  import { BusinessBasicInformation } from '../BusinessBasicInformation'
@@ -31,6 +33,9 @@ import { OrderSummary } from '../OrderSummary'
31
33
  import { Cart } from '../Cart'
32
34
  import { SingleProductCard } from '../../../../../src/components/SingleProductCard'
33
35
  import NavBar from '../NavBar'
36
+ import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
37
+
38
+ const PIXELS_TO_SCROLL = 1000
34
39
 
35
40
  const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
36
41
  const {
@@ -47,6 +52,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
47
52
  header,
48
53
  logo,
49
54
  productModal,
55
+ getNextProducts,
50
56
  handleChangeCategory,
51
57
  setProductLogin,
52
58
  updateProductModal
@@ -57,6 +63,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
57
63
  const [{ auth }] = useSession()
58
64
  const [orderState] = useOrder()
59
65
  const [{ parsePrice }] = useUtils()
66
+ const [ ,{ showToast }] = useToast()
60
67
  const { business, loading, error } = businessState
61
68
  const [openBusinessInformation, setOpenBusinessInformation] = useState(false)
62
69
  const [curProduct, setCurProduct] = useState(null)
@@ -100,6 +107,16 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
100
107
  setOpenUpselling(false)
101
108
  }
102
109
 
110
+ const handleScroll = ({ nativeEvent }: any) => {
111
+ const y = nativeEvent.contentOffset.y
112
+ const height = nativeEvent.contentSize.height
113
+ const hasMore = !(categoryState.pagination.totalPages === categoryState.pagination.currentPage)
114
+ if (y + PIXELS_TO_SCROLL > height && !loading && hasMore && getNextProducts) {
115
+ getNextProducts()
116
+ showToast(ToastType.Info, t('LOADING_MORE_PRODUCTS', 'Loading more products'))
117
+ }
118
+ }
119
+
103
120
  return (
104
121
  <>
105
122
  <BusinessProductsListingContainer
@@ -107,6 +124,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
107
124
  isActiveFloatingButtom={currentCart?.products?.length > 0 && categoryState.products.length !== 0}
108
125
  contentContainerStyle={{ paddingBottom: 40 }}
109
126
  showsVerticalScrollIndicator={false}
127
+ onScroll={(e: any) => handleScroll(e)}
110
128
  >
111
129
  <WrapHeader>
112
130
  {!loading && business?.id && (
@@ -223,6 +241,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
223
241
  paddingHorizontal: 40,
224
242
  paddingVertical: 20
225
243
  }}
244
+ onScroll={(e: any) => handleScroll(e)}
226
245
  >
227
246
  <NavBar
228
247
  title={categorySelected?.name}
@@ -232,9 +251,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
232
251
  />
233
252
  <View>
234
253
  {categorySelected.id && (
235
- categoryState.products?.map((product: any) => (
254
+ categoryState.products?.map((product: any, index: number) => (
236
255
  <SingleProductCard
237
- key={product.id}
256
+ key={index}
238
257
  isSoldOut={(product.inventoried && !product.quantity)}
239
258
  product={product}
240
259
  businessId={business.id}
@@ -243,6 +262,28 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
243
262
  ))
244
263
  )}
245
264
  </View>
265
+
266
+ {
267
+ categoryState.loading && (
268
+ <>
269
+ {[...Array(10).keys()].map((item, i) => (
270
+ <Placeholder key={i} style={{ marginBottom: 10 }} Animation={Fade}>
271
+ <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
272
+ <View
273
+ style={{ width: 80, height: 80 }}
274
+ >
275
+ <PlaceholderLine width={80} height={70} />
276
+ </View>
277
+ <Placeholder>
278
+ <PlaceholderLine width={60} style={{marginBottom: 30}}/>
279
+ <PlaceholderLine width={20} />
280
+ </Placeholder>
281
+ </View>
282
+ </Placeholder>
283
+ ))}
284
+ </>
285
+ )
286
+ }
246
287
  </ScrollView>
247
288
  </OModal>
248
289
 
@@ -3,7 +3,7 @@ import styled from 'styled-components/native'
3
3
  export const WrapHeader = styled.View`
4
4
  position: relative;
5
5
  border-bottom-width: 16px;
6
- border-bottom-color: ${(props: any) => props.theme.colors.secundary}
6
+ border-bottom-color: ${(props: any) => props.theme.colors.secundary};
7
7
  `
8
8
  export const TopHeader = styled.View`
9
9
  position: absolute;
@@ -160,6 +160,7 @@ export interface BusinessProductsListingParams {
160
160
  header?: any;
161
161
  logo?: any;
162
162
  productModal?: any;
163
+ getNextProducts?: () => {};
163
164
  handleChangeCategory: (value: any) => {};
164
165
  setProductLogin?: () => {};
165
166
  updateProductModal?: (value: any) => {},
@@ -100,8 +100,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
100
100
  style={{
101
101
  width:
102
102
  orientationState?.orientation === LANDSCAPE
103
- ? bottomSheetVisibility ? orientationState?.dimensions?.width * 0.15 :orientationState?.dimensions?.width * 0.16
104
- : orientationState?.dimensions?.width * 0.21,
103
+ ? bottomSheetVisibility ? orientationState?.dimensions?.width * 0.145 :orientationState?.dimensions?.width * 0.16
104
+ : orientationState?.dimensions?.width * 0.20,
105
105
  }}
106
106
  onPress={() => {
107
107
  resetInactivityTimeout()
@@ -135,8 +135,8 @@ const CategoriesMenu = (props: any): React.ReactElement => {
135
135
  image={{ uri: product?.images }}
136
136
  style={{
137
137
  width: orientationState?.orientation === LANDSCAPE
138
- ? bottomSheetVisibility ? orientationState?.dimensions?.width * 0.15 :orientationState?.dimensions?.width * 0.16
139
- : orientationState?.dimensions?.width * 0.21
138
+ ? bottomSheetVisibility ? orientationState?.dimensions?.width * 0.145 :orientationState?.dimensions?.width * 0.16
139
+ : orientationState?.dimensions?.width * 0.20
140
140
  }}
141
141
  titleStyle={{marginTop: Platform.OS === 'ios' ? 10 : 0}}
142
142
  onPress={() => {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react'
2
2
  import styled from 'styled-components/native'
3
3
  import { OIcon, OButton, OText } from '../shared'
4
- import { ImageStyle, TextStyle, View } from 'react-native'
4
+ import { ImageStyle, TextStyle, View, Platform } from 'react-native'
5
5
  import { OrderTypeSelector } from '../OrderTypeSelector'
6
6
  import { useConfig } from 'ordering-components/native'
7
7
  import { useTheme } from 'styled-components/native'
@@ -15,6 +15,7 @@ const Wrapper = styled.View`
15
15
  position: relative;
16
16
  border-bottom-color: #E1E8ED;
17
17
  border-bottom-width: 1px;
18
+ margin-top: ${Platform.OS === 'ios' ? '10px' : '0px'};
18
19
  `
19
20
  const TitleWrapper = styled.View`
20
21
  flex-direction: column;
@@ -124,7 +125,7 @@ const NavBar = (props: Props) => {
124
125
 
125
126
  NavBar.defaultProps = {
126
127
  title: '',
127
- textAlign: 'center'
128
+ textAlign: 'center',
128
129
  };
129
130
 
130
131
  export default NavBar;
@@ -207,8 +207,14 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
207
207
 
208
208
  useEffect(() => {
209
209
  const getCustomerName = async () => {
210
- const { customerName: name } = await _retrieveStoreData('customer_name')
211
- setCustomerName(name)
210
+ try {
211
+ const { customerName: name } = await _retrieveStoreData('customer_name')
212
+ setCustomerName(name)
213
+ } catch (e) {
214
+ if (e) {
215
+ setCustomerName('')
216
+ }
217
+ }
212
218
  }
213
219
  getCustomerName()
214
220
  const redirectHome = setTimeout(() =>{
@@ -43,7 +43,7 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
43
43
  imageStyle: {
44
44
  width: '100%',
45
45
  height: Platform.OS === 'ios' ? 250 : 180,
46
- resizeMode: 'cover',
46
+ resizeMode: Platform.OS === 'ios' ? 'contain' : 'cover',
47
47
  borderRadius: 10,
48
48
  },
49
49
  closeUpsellingButton: {
@@ -55,6 +55,8 @@ import { ProductIngredient } from './src/components/ProductIngredient';
55
55
  import { ProductItemAccordion } from './src/components/ProductItemAccordion';
56
56
  import { ProductOption } from './src/components/ProductOption';
57
57
  import { ProductOptionSubOption } from './src/components/ProductOptionSubOption';
58
+ import { PromotionCard } from './src/components/PromotionCard';
59
+ import { Promotions } from './src/components/Promotions';
58
60
  import { ReviewOrder } from './src/components/ReviewOrder';
59
61
  import { SearchBar } from './src/components/SearchBar';
60
62
  import { SignupForm } from './src/components/SignupForm';
@@ -159,6 +161,8 @@ export {
159
161
  ProductItemAccordion,
160
162
  ProductOption,
161
163
  ProductOptionSubOption,
164
+ PromotionCard,
165
+ Promotions,
162
166
  SearchBar,
163
167
  SingleProductCard,
164
168
  StripeCardForm,
@@ -4,7 +4,7 @@ import {
4
4
  View,
5
5
  TouchableOpacity,
6
6
  Keyboard,
7
- TouchableWithoutFeedback,
7
+ ScrollView,
8
8
  } from 'react-native';
9
9
  import {
10
10
  AddressForm as AddressFormController,
@@ -510,8 +510,13 @@ const AddressFormUI = (props: AddressFormParams) => {
510
510
  titleStyle={{ fontSize: 14 }}
511
511
  titleWrapStyle={{ flexBasis: '75%' }}
512
512
  />
513
- <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
514
- <AddressFormContainer style={{ height: 600, overflow: 'scroll' }}>
513
+
514
+ <ScrollView
515
+ horizontal={false}
516
+ keyboardShouldPersistTaps='handled'
517
+ style={{ paddingBottom: 60 }}
518
+ >
519
+ <AddressFormContainer style={{ overflow: 'scroll' }}>
515
520
  <View>
516
521
  <FormInput>
517
522
  <AutocompleteInput>
@@ -593,13 +598,13 @@ const AddressFormUI = (props: AddressFormParams) => {
593
598
  />
594
599
  )}
595
600
  />
596
- {hasEditing ? (
601
+ {(hasEditing && !formState?.changes?.address) ? (
597
602
  <View style={styles.pinIcon}>
598
- <GPSButton
603
+ <GPSButton
599
604
  apiKey={googleMapsApiKey}
600
605
  handleGPS={(data: any, detail: any) => {
601
606
  handleChangeAddress(data, detail);
602
- setValue(data.address);
607
+ setValue('address', data.address);
603
608
  if (googleInput?.current) {
604
609
  googleInput?.current?.setAddressText( data.address );
605
610
  }
@@ -610,17 +615,6 @@ const AddressFormUI = (props: AddressFormParams) => {
610
615
  ) : null}
611
616
  </AutocompleteInput>
612
617
 
613
- {/* {!isKeyboardShow && (addressState?.address?.location || formState?.changes?.location) && (
614
- <TouchableOpacity onPress={handleToggleMap} style={{ marginBottom: 10 }}>
615
- <OText
616
- color={theme.colors.primary}
617
- style={{ textAlign: 'center' }}
618
- >
619
- {t('VIEW_MAP', 'View map to modify the exact location')}
620
- </OText>
621
- </TouchableOpacity>
622
- )} */}
623
-
624
618
  {(locationChange || formState.changes?.location) && (
625
619
  <View
626
620
  style={{
@@ -820,34 +814,35 @@ const AddressFormUI = (props: AddressFormParams) => {
820
814
  />
821
815
  )}
822
816
  </View>
823
- <OModal
824
- open={toggleMap}
825
- onClose={() => handleToggleMap()}
826
- entireModal
827
- customClose>
828
- {(locationChange || formState.changes?.location) && (
829
- <GoogleMapContainer>
830
- <GoogleMap
831
- location={locationChange || formState.changes?.location}
832
- handleChangeAddressMap={handleChangeAddress}
833
- maxLimitLocation={maxLimitLocation}
834
- saveLocation={saveMapLocation}
835
- setSaveLocation={setSaveMapLocation}
836
- handleToggleMap={handleToggleMap}
837
- />
838
- </GoogleMapContainer>
839
- )}
840
- <OButton
841
- text={t('SAVE', 'Save')}
842
- textStyle={{ color: theme.colors.white }}
843
- imgRightSrc={null}
844
- style={{ marginHorizontal: 30, marginBottom: 10 }}
845
- onClick={() => setSaveMapLocation(true)}
846
- />
847
- </OModal>
848
- <Spinner visible={saveMapLocation} />
849
817
  </AddressFormContainer>
850
- </TouchableWithoutFeedback>
818
+ </ScrollView>
819
+
820
+ <OModal
821
+ open={toggleMap}
822
+ onClose={() => handleToggleMap()}
823
+ entireModal
824
+ customClose>
825
+ {(locationChange || formState.changes?.location) && (
826
+ <GoogleMapContainer>
827
+ <GoogleMap
828
+ location={locationChange || formState.changes?.location}
829
+ handleChangeAddressMap={handleChangeAddress}
830
+ maxLimitLocation={maxLimitLocation}
831
+ saveLocation={saveMapLocation}
832
+ setSaveLocation={setSaveMapLocation}
833
+ handleToggleMap={handleToggleMap}
834
+ />
835
+ </GoogleMapContainer>
836
+ )}
837
+ <OButton
838
+ text={t('SAVE', 'Save')}
839
+ textStyle={{ color: theme.colors.white }}
840
+ imgRightSrc={null}
841
+ style={{ marginHorizontal: 30, marginBottom: 10 }}
842
+ onClick={() => setSaveMapLocation(true)}
843
+ />
844
+ </OModal>
845
+ <Spinner visible={saveMapLocation} />
851
846
  </>
852
847
  );
853
848
  };
@@ -17,7 +17,7 @@ export const MediaWrapper = styled.ScrollView`
17
17
  height: 127px;
18
18
  `
19
19
  export const InnerContent = styled.View`
20
- padding: 20px 40px;
20
+ padding: 20px;
21
21
  `
22
22
  export const WrapScheduleBlock = styled.View`
23
23
  margin: 20px 0;