ordering-ui-react-native 0.18.61 → 0.18.63

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,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.18.61",
3
+ "version": "0.18.63",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -25,9 +25,9 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
25
25
  const [{ configs }] = useConfig()
26
26
  const applePay = ['global_apple_pay', 'apple_pay']
27
27
  const googlePay = ['global_google_pay', 'google_pay']
28
+
28
29
  useEffect(() => {
29
30
  if (Platform.OS === 'ios') {
30
- setErrors(t('GOOGLE_PAY_NOT_SUPPORTED', 'Google pay not supported'))
31
31
  setMethodPaySupported({
32
32
  enabled: false,
33
33
  loading: false
@@ -78,7 +78,7 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
78
78
  setPlaceByMethodPay(false)
79
79
  }
80
80
  }
81
- if (googlePay.includes(paymethod)) {
81
+ if (googlePay.includes(paymethod) && !methodPaySupported?.enabled) {
82
82
  initialize();
83
83
  }
84
84
  }, [initGooglePay, paymethod]);
@@ -87,9 +87,8 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
87
87
  if (applePay.includes(paymethod) && !paymethod) return
88
88
  if (Platform.OS === 'android') {
89
89
  setPlaceByMethodPay(false)
90
- setErrors(t('APPLE_PAY_NOT_SUPPORTED', 'Apple pay not supported'))
91
90
  setMethodPaySupported({
92
- enabled: false,
91
+ ...methodPaySupported,
93
92
  loading: false
94
93
  })
95
94
  return
@@ -111,7 +110,6 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
111
110
  enabled: true,
112
111
  loading: false
113
112
  })
114
- return;
115
113
  } else if (paymentMethod) {
116
114
  setMethodPaySupported({
117
115
  enabled: true,
@@ -123,7 +123,7 @@ const AddressFormUI = (props: AddressFormParams) => {
123
123
  },
124
124
  wrapperNavbar: Platform.OS === 'ios'
125
125
  ? { paddingVertical: 0, paddingLeft: 40, paddingRight: 20 }
126
- : { paddingVertical: 20, paddingLeft: 40, paddingRight: 20 }
126
+ : { paddingVertical: 10, paddingLeft: 40, paddingRight: 20 }
127
127
  });
128
128
 
129
129
  const [, t] = useLanguage();
@@ -176,7 +176,6 @@ const AddressFormUI = (props: AddressFormParams) => {
176
176
 
177
177
  const getAddressFormatted = (address: any) => {
178
178
  const data: any = { address: null, error: null };
179
- Geocoder.init(googleMapsApiKey);
180
179
  Geocoder.from(address)
181
180
  .then((json) => {
182
181
  if (json.results && json.results?.length > 0) {
@@ -491,6 +490,10 @@ const AddressFormUI = (props: AddressFormParams) => {
491
490
  }
492
491
  }, []);
493
492
 
493
+ useEffect(() => {
494
+ Geocoder.init(googleMapsApiKey);
495
+ }, [googleMapsApiKey]);
496
+
494
497
  useEffect(() => {
495
498
  const keyboardDidShowListener = Keyboard.addListener(
496
499
  'keyboardDidShow',
@@ -535,7 +538,7 @@ const AddressFormUI = (props: AddressFormParams) => {
535
538
  />
536
539
  </View>
537
540
  <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
538
- <AddressFormContainer style={{ height: HEIGHT_SCREEN * .78, overflow: 'scroll' }}>
541
+ <AddressFormContainer style={{ overflow: 'scroll' }}>
539
542
  <View>
540
543
  <FormInput>
541
544
  <AutocompleteInput>
@@ -640,6 +643,7 @@ const AddressFormUI = (props: AddressFormParams) => {
640
643
  }
641
644
  }}
642
645
  IconButton={<OIcon src={theme.images.general.pin} width={16} />}
646
+ isIntGeoCoder
643
647
  />
644
648
  </View>
645
649
  )}
@@ -661,6 +665,7 @@ const AddressFormUI = (props: AddressFormParams) => {
661
665
  saveLocation={saveMapLocation}
662
666
  setSaveLocation={setSaveMapLocation}
663
667
  handleToggleMap={handleToggleMap}
668
+ isIntGeoCoder
664
669
  />
665
670
  </GoogleMapContainer>
666
671
  </View>
@@ -871,6 +876,7 @@ const AddressFormUI = (props: AddressFormParams) => {
871
876
  saveLocation={saveMapLocation}
872
877
  setSaveLocation={setSaveMapLocation}
873
878
  handleToggleMap={handleToggleMap}
879
+ isIntGeoCoder
874
880
  />
875
881
  </GoogleMapContainer>
876
882
  )}
@@ -14,7 +14,8 @@ import { OIcon, OText } from '../shared';
14
14
  import { Dimensions, StyleSheet, View } from 'react-native';
15
15
  import { InView } from 'react-native-intersection-observer'
16
16
  import { BusinessControllerParams } from '../../types';
17
- import { convertHoursToMinutes, lightenDarkenColor, shape, vibrateApp } from '../../utils';
17
+ import { convertHoursToMinutes, lightenDarkenColor, shape } from '../../utils';
18
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
18
19
 
19
20
  import {
20
21
  BusinessHero,
@@ -151,6 +152,14 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
151
152
  return _types.join(', ');
152
153
  };
153
154
 
155
+ const vibrateApp = (impact?: string) => {
156
+ const options = {
157
+ enableVibrateFallback: true,
158
+ ignoreAndroidSystemSettings: false
159
+ };
160
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
161
+ }
162
+
154
163
  const handleBusinessClick = (selectedBusiness: any) => {
155
164
  vibrateApp()
156
165
  if (business?.open) handleClick && handleClick(selectedBusiness)
@@ -26,6 +26,7 @@ import { _retrieveStoreData, _removeStoreData } from '../../providers/StoreUtil'
26
26
  import IconAntDesign from 'react-native-vector-icons/AntDesign';
27
27
  import { useIsFocused } from '@react-navigation/native';
28
28
  import AntDesignIcon from 'react-native-vector-icons/AntDesign'
29
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
29
30
 
30
31
  import {
31
32
  TopHeader,
@@ -44,7 +45,6 @@ import { ProfessionalFilter } from '../ProfessionalFilter';
44
45
  import { ServiceForm } from '../ServiceForm';
45
46
  import { BusinessesListing } from '../BusinessesListing/Layout/Original'
46
47
  import { PageBanner } from '../PageBanner'
47
- import { vibrateApp } from '../../utils';
48
48
 
49
49
  const PIXELS_TO_SCROLL = 2000
50
50
 
@@ -147,11 +147,18 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
147
147
  const currentCart: any = Object.values(orderState.carts).find((cart: any) => cart?.business?.slug === business?.slug) ?? {}
148
148
  const isOpenFiltProducts = isOpenSearchBar && !!searchValue
149
149
  const filtProductsHeight = Platform.OS === 'ios' ? 165 : 100
150
- const viewOrderButtonVisible = !loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0
150
+ const viewOrderButtonVisible = !loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0
151
151
 
152
152
  const onRedirect = (route: string, params?: any) => {
153
153
  navigation.navigate(route, params)
154
154
  }
155
+ const vibrateApp = (impact?: string) => {
156
+ const options = {
157
+ enableVibrateFallback: true,
158
+ ignoreAndroidSystemSettings: false
159
+ };
160
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
161
+ }
155
162
  const onProductClick = async (product: any) => {
156
163
  if (product.ingredients?.length === 0 && product.extras.length === 0 && !product.inventoried && auth && isQuickAddProduct) {
157
164
  const isProductAddedToCart = currentCart?.products?.find((Cproduct: any) => Cproduct.id === product.id)
@@ -315,7 +322,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
315
322
  }
316
323
  }, [isFocused])
317
324
 
318
-
325
+
319
326
  useEffect(() => {
320
327
  function onKeyboardDidShow(e: KeyboardEvent) {
321
328
  setKeyboardHeight(e?.endCoordinates?.height);
@@ -395,7 +402,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
395
402
  <>
396
403
  {!(businessSingleId && auth) && (
397
404
  <TopActions onPress={() => handleBackNavigation()}>
398
- <AntDesignIcon
405
+ <AntDesignIcon
399
406
  name='arrowleft'
400
407
  size={26}
401
408
  />
@@ -3,6 +3,7 @@ import { View, StyleSheet, TouchableOpacity, Platform, I18nManager, ScrollView }
3
3
  import { initStripe, useConfirmPayment } from '@stripe/stripe-react-native';
4
4
  import Picker from 'react-native-country-picker-modal';
5
5
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons'
6
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
6
7
  import {
7
8
  Checkout as CheckoutController,
8
9
  useOrder,
@@ -52,7 +53,7 @@ import { FloatingButton } from '../FloatingButton';
52
53
  import { Container } from '../../layouts/Container';
53
54
  import NavBar from '../NavBar';
54
55
  import { OrderSummary } from '../OrderSummary';
55
- import { getTypesText, vibrateApp } from '../../utils';
56
+ import { getTypesText } from '../../utils';
56
57
  import { CartStoresListing } from '../CartStoresListing';
57
58
  import { PaymentOptionsWebView } from '../../../../../src/components/PaymentOptionsWebView';
58
59
 
@@ -211,6 +212,14 @@ const CheckoutUI = (props: any) => {
211
212
  }
212
213
  }
213
214
 
215
+ const vibrateApp = (impact?: string) => {
216
+ const options = {
217
+ enableVibrateFallback: true,
218
+ ignoreAndroidSystemSettings: false
219
+ };
220
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
221
+ }
222
+
214
223
  const handleSuccessSignup = (user: any) => {
215
224
  login({
216
225
  user,
@@ -12,7 +12,8 @@ export const GPSButton = (props: any) => {
12
12
  handleGPS,
13
13
  apiKey,
14
14
  IconButton,
15
- IconLoadingButton
15
+ IconLoadingButton,
16
+ isIntGeoCoder
16
17
  } = props
17
18
 
18
19
  const [isLoading, setLoading] = useState(false);
@@ -31,7 +32,7 @@ export const GPSButton = (props: any) => {
31
32
  break
32
33
  }
33
34
  }
34
- let data = null
35
+ let data : any
35
36
  const details = {
36
37
  geometry: { location: { lat: pos.latitude, lng: pos.longitude } }
37
38
  }
@@ -68,12 +69,13 @@ export const GPSButton = (props: any) => {
68
69
  setLoading(false);
69
70
  console.log(`ERROR(${err.code}): ${err.message}`)
70
71
  }, {
71
- enableHighAccuracy: true, timeout: 15000, maximumAge: 10000
72
+ enableHighAccuracy: false, timeout: 30000, maximumAge: 1000
72
73
  })
73
74
  }
74
75
  }
75
76
 
76
77
  useEffect(() => {
78
+ if (isIntGeoCoder) return
77
79
  Geocoder.init(apiKey);
78
80
  }, [])
79
81
 
@@ -18,7 +18,8 @@ export const GoogleMap = (props: GoogleMapsParams) => {
18
18
  saveLocation,
19
19
  setSaveLocation,
20
20
  handleToggleMap,
21
- locations
21
+ locations,
22
+ isIntGeoCoder
22
23
  } = props
23
24
 
24
25
  const [, t] = useLanguage()
@@ -161,8 +162,9 @@ export const GoogleMap = (props: GoogleMapsParams) => {
161
162
  }
162
163
 
163
164
  useEffect(() => {
165
+ if (isIntGeoCoder) return
164
166
  Geocoder.init(googleMapsApiKey)
165
- }, [])
167
+ }, [isIntGeoCoder])
166
168
 
167
169
  useEffect(() => {
168
170
  mapRef.current.animateToRegion({
@@ -6,6 +6,7 @@ import { PhoneInputNumber } from '../PhoneInputNumber';
6
6
  import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
7
7
  import Recaptcha from 'react-native-recaptcha-that-works'
8
8
  import ReCaptcha from '@fatnlazycat/react-native-recaptcha-v3'
9
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
9
10
 
10
11
  import {
11
12
  LoginForm as LoginFormController,
@@ -45,7 +46,6 @@ import { AppleLogin } from '../AppleLogin';
45
46
  import { Otp } from './Otp'
46
47
  import { TouchableOpacity } from 'react-native-gesture-handler';
47
48
  import Alert from '../../../../../src/providers/AlertProvider'
48
- import { vibrateApp } from '../../utils';
49
49
 
50
50
  const LoginFormUI = (props: LoginParams) => {
51
51
  const {
@@ -162,6 +162,14 @@ const LoginFormUI = (props: LoginParams) => {
162
162
  handleCategoryScroll(otpType ? `${val}_${otpType}` : val)
163
163
  };
164
164
 
165
+ const vibrateApp = (impact?: string) => {
166
+ const options = {
167
+ enableVibrateFallback: true,
168
+ ignoreAndroidSystemSettings: false
169
+ };
170
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
171
+ }
172
+
165
173
  const onSubmit = (values?: any) => {
166
174
  Keyboard.dismiss();
167
175
  if (loginTab === 'otp') {
@@ -170,7 +178,7 @@ const LoginFormUI = (props: LoginParams) => {
170
178
  vibrateApp()
171
179
  return
172
180
  }
173
- if(!values?.cellphone && otpType === 'cellphone'){
181
+ if (!values?.cellphone && otpType === 'cellphone') {
174
182
  showToast(ToastType.Error, t('PHONE_NUMBER_REQUIRED', 'Phone number is required'));
175
183
  return
176
184
  }
@@ -259,7 +267,7 @@ const LoginFormUI = (props: LoginParams) => {
259
267
  const handleLoginOtp = async (code: string) => {
260
268
  if (!code) return
261
269
  const logged = await handleButtonLoginClick({ code })
262
- if (logged){
270
+ if (logged) {
263
271
  setWillVerifyOtpState(false)
264
272
  } else {
265
273
  setAlertState({
@@ -13,6 +13,7 @@ import { getIconCard, flatArray } from '../../utils'
13
13
  import { StripeElementsForm } from '../StripeElementsForm'
14
14
  import { StripeCardsList } from '../StripeCardsList'
15
15
  import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
16
+ import { useApplePay } from '@stripe/stripe-react-native';
16
17
 
17
18
  import {
18
19
  PMContainer,
@@ -44,6 +45,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
44
45
  const [, t] = useLanguage()
45
46
  const [{ configs }] = useConfig()
46
47
  const [{ parsePrice }] = useUtils()
48
+ const { confirmApplePayPayment } = useApplePay()
47
49
 
48
50
  const [addCardOpen, setAddCardOpen] = useState({ stripe: false, stripeConnect: false });
49
51
 
@@ -92,7 +94,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
92
94
  if (methodsPay.includes(paymethodSelected?.gateway)) {
93
95
  if (typeof paymethodSelected?.paymethod_data === 'string'){
94
96
  const sourceId = JSON.parse(paymethodSelected?.paymethod_data)?.source_id
95
- sourceId && handlePlaceOrder()
97
+ sourceId && handlePlaceOrder(confirmApplePayPayment)
96
98
  }
97
99
  }
98
100
  }, [JSON.stringify(paymethodSelected)])
@@ -100,7 +102,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
100
102
  const renderPaymethods = ({ item }: any) => {
101
103
  return (
102
104
  <>
103
- {item?.gateway === 'apple_pay' ? (
105
+ {item?.gateway === 'global_apple_pay' ? (
104
106
  <TouchableOpacity
105
107
  onPress={() => handleSelectPaymethod({ ...item, paymethod: { gateway: item.gateway }, paymethod_id: item?.id })}
106
108
  >
@@ -123,7 +125,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
123
125
  src={getPayIcon(item?.gateway ?? item.paymethod?.gateway)}
124
126
  width={20}
125
127
  height={20}
126
- color={item?.gateway === 'apple_pay' ? '' : paymethodSelected?.id === item.id ? theme.colors.white : theme.colors.backgroundDark}
128
+ color={item?.gateway === 'global_apple_pay' ? '' : paymethodSelected?.id === item.id ? theme.colors.white : theme.colors.backgroundDark}
127
129
  />
128
130
  <OText
129
131
  size={10}
@@ -177,9 +177,9 @@ const MultiCheckoutUI = (props: any) => {
177
177
  setPhoneUpdate(val)
178
178
  }
179
179
 
180
- const handlePlaceOrder = () => {
180
+ const handlePlaceOrder = (confirmPayment ?: any) => {
181
181
  if (!userErrors.length) {
182
- handleGroupPlaceOrder && handleGroupPlaceOrder()
182
+ handleGroupPlaceOrder && handleGroupPlaceOrder(confirmPayment)
183
183
  return
184
184
  }
185
185
  let stringError = ''
@@ -12,14 +12,31 @@ export const OrderEta = (props: any) => {
12
12
  const [estimatedDeliveryTime, setEstimatedDeliveryTime] = useState(null)
13
13
 
14
14
  const getEstimatedDeliveryTime = () => {
15
- let _estimatedTime = null
15
+ let estimatedUtcTime = null
16
16
  let totalEta = 0
17
+ if (order?.delivered_in) totalEta += order?.delivered_in
18
+ if (order?.prepared_in) totalEta += order?.prepared_in
19
+ if (order?.delivery_type === 1 && order?.eta_drive_time) {
20
+ totalEta += order?.eta_drive_time
21
+ }
22
+
17
23
  const _delivery = order?.delivery_datetime_utc
18
24
  ? order?.delivery_datetime_utc
19
25
  : order?.delivery_datetime
26
+
20
27
  if (order?.eta_current_status_time) {
21
28
  const currentStatueEta = order?.eta_current_status_time
22
29
  totalEta += currentStatueEta
30
+ let previousStatusTimes = 0
31
+ if (order?.eta_previous_status_times) {
32
+ Object.keys(order.eta_previous_status_times).map(key => {
33
+ if (!key.includes('status_penalty')) {
34
+ previousStatusTimes += order.eta_previous_status_times[key]
35
+ }
36
+ })
37
+ }
38
+ totalEta += previousStatusTimes
39
+
23
40
  let nextStatusTimes = 0
24
41
  if (order?.eta_next_status_times) {
25
42
  Object.keys(order.eta_next_status_times).map(key => {
@@ -28,7 +45,6 @@ export const OrderEta = (props: any) => {
28
45
  }
29
46
  })
30
47
  }
31
-
32
48
  totalEta += nextStatusTimes
33
49
 
34
50
  const diffTimeAsSeconds = moment.utc(order?.reporting_data?.at[`status:${order.status}`]).add(order?.eta_current_status_time, 'minutes').diff(moment().utc(), 'seconds')
@@ -36,15 +52,11 @@ export const OrderEta = (props: any) => {
36
52
  if (diffTimeAsMinutes <= 0) {
37
53
  totalEta += (Math.floor(Math.abs(diffTimeAsMinutes / order?.eta_current_status_time) + 1) * order?.eta_current_status_penalty_time)
38
54
  }
39
- _estimatedTime = moment.utc(_delivery).add(totalEta, 'minutes')
40
55
  } else {
41
- let timesToAdd = 0
42
- if (order?.delivered_in) timesToAdd += order?.delivered_in
43
- if (order?.prepared_in) timesToAdd += order?.prepared_in
44
- const _etaTime = order?.eta_time + timesToAdd
45
- _estimatedTime = moment.utc(_delivery).add(_etaTime, 'minutes')
56
+ totalEta = order?.eta_time + totalEta
46
57
  }
47
- _estimatedTime = outputFormat ? moment(_estimatedTime).local().format(outputFormat) : parseDate(_estimatedTime, { utc: false })
58
+ estimatedUtcTime = moment.utc(_delivery).add(totalEta, 'minutes')
59
+ const _estimatedTime = outputFormat ? moment(estimatedUtcTime).local().format(outputFormat) : parseDate(estimatedUtcTime, { utc: false })
48
60
  setEstimatedDeliveryTime(_estimatedTime)
49
61
  }
50
62
 
@@ -30,6 +30,7 @@ import Swiper from 'react-native-swiper'
30
30
  import FastImage from 'react-native-fast-image';
31
31
  import IconAntDesign from 'react-native-vector-icons/AntDesign';
32
32
  import YoutubePlayer from "react-native-youtube-iframe"
33
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
33
34
 
34
35
  import {
35
36
  WrapHeader,
@@ -54,7 +55,7 @@ import { ProductOptionSubOption } from '../ProductOptionSubOption';
54
55
  import { NotFoundSource } from '../NotFoundSource';
55
56
  import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
56
57
  import NavBar from '../NavBar';
57
- import { orderTypeList, vibrateApp } from '../../utils';
58
+ import { orderTypeList } from '../../utils';
58
59
  const windowWidth = Dimensions.get('window').width;
59
60
 
60
61
  export const ProductOptionsUI = (props: any) => {
@@ -208,7 +209,15 @@ export const ProductOptionsUI = (props: any) => {
208
209
  const [showTitle, setShowTitle] = useState(false)
209
210
 
210
211
  const guestCheckoutEnabled = configs?.guest_checkout_enabled?.value === '1'
211
- const orderTypeEnabled = !orderTypeList[orderState?.options?.type - 1] || configs?.allowed_order_types_guest_checkout?.value?.includes(orderTypeList[orderState?.options?.type - 1])
212
+ const orderTypeEnabled = !orderTypeList[orderState?.options?.type - 1] || configs?.allowed_order_types_guest_checkout?.value?.includes(orderTypeList[orderState?.options?.type - 1])
213
+
214
+ const vibrateApp = (impact?: string) => {
215
+ const options = {
216
+ enableVibrateFallback: true,
217
+ ignoreAndroidSystemSettings: false
218
+ };
219
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
220
+ }
212
221
 
213
222
  const isError = (id: number) => {
214
223
  let bgColor = theme.colors.white;
@@ -8,6 +8,7 @@ import { PhoneInputNumber } from '../PhoneInputNumber';
8
8
  import { FacebookLogin } from '../FacebookLogin';
9
9
  import Recaptcha from 'react-native-recaptcha-that-works'
10
10
  import ReCaptcha from '@fatnlazycat/react-native-recaptcha-v3'
11
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
11
12
 
12
13
  import {
13
14
  SignupForm as SignUpController,
@@ -37,7 +38,7 @@ import Alert from '../../../../../src/providers/AlertProvider'
37
38
  import { OText, OButton, OInput } from '../shared';
38
39
  import { OModal } from '../../../../../src/components/shared';
39
40
  import { SignupParams } from '../../types';
40
- import { sortInputFields, vibrateApp } from '../../utils';
41
+ import { sortInputFields } from '../../utils';
41
42
  import { GoogleLogin } from '../GoogleLogin';
42
43
  import { AppleLogin } from '../AppleLogin';
43
44
 
@@ -164,6 +165,14 @@ const SignupFormUI = (props: SignupParams) => {
164
165
  })
165
166
  }
166
167
 
168
+ const vibrateApp = (impact?: string) => {
169
+ const options = {
170
+ enableVibrateFallback: true,
171
+ ignoreAndroidSystemSettings: false
172
+ };
173
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
174
+ }
175
+
167
176
  const handleRefs = (ref: any, code: string) => {
168
177
  switch (code) {
169
178
  case 'name': {
@@ -629,7 +629,8 @@ export interface GoogleMapsParams {
629
629
  isSetInputs?: boolean,
630
630
  locations?: Array<any>,
631
631
  setSaveLocation?: (val: boolean) => void,
632
- handleToggleMap?: () => void
632
+ handleToggleMap?: () => void,
633
+ isIntGeoCoder: boolean
633
634
  }
634
635
 
635
636
  export interface HelpParams {
@@ -4,7 +4,6 @@ import FontAwesome from 'react-native-vector-icons/FontAwesome';
4
4
  import { CODES } from 'ordering-components/native'
5
5
  import { ORDER_TYPES } from '../config/constants';
6
6
  import { useTheme } from 'styled-components/native';
7
- import ReactNativeHapticFeedback from "react-native-haptic-feedback";
8
7
 
9
8
  const [languageState, t] = useLanguage();
10
9
  const theme = useTheme()
@@ -613,13 +612,3 @@ export const lightenDarkenColor = (color: any) => {
613
612
  return false
614
613
  }
615
614
  }
616
-
617
- export const vibrateApp = (impact?: string) => {
618
- const options = {
619
- enableVibrateFallback: true,
620
- ignoreAndroidSystemSettings: false
621
- };
622
-
623
- ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
624
-
625
- }