ordering-ui-react-native 0.18.46 → 0.18.48

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.46",
3
+ "version": "0.18.48",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -6,6 +6,7 @@ import { Platform, View } from 'react-native';
6
6
  import { StripeMethodFormParams } from '../../types';
7
7
  import Spinner from 'react-native-loading-spinner-overlay';
8
8
  import { android_app_id } from '../../config.json'
9
+
9
10
  export const StripeMethodForm = (props: StripeMethodFormParams) => {
10
11
  const {
11
12
  cart,
@@ -96,21 +97,12 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
96
97
  }
97
98
 
98
99
  const { error, paymentMethod } = await presentApplePay({
99
- cartItems: cart?.products?.map((product: any) => ({ label: product?.name, amount: product?.price?.toString?.() })),
100
+ cartItems: [{
101
+ label: t('CART', 'Cart'),
102
+ amount: cart?.balance?.toString() ?? cart?.total?.toString?.()
103
+ }],
100
104
  country: 'US',
101
105
  currency: configs?.stripe_currency?.value ?? 'USD',
102
- shippingMethods: [
103
- {
104
- amount: cart?.balance?.toString() ?? cart?.total?.toString?.(),
105
- identifier: 'standard',
106
- label: 'Courier',
107
- detail: 'Delivery',
108
- type: 'final',
109
- },
110
- ],
111
-
112
- requiredShippingAddressFields: ['emailAddress', 'phoneNumber'],
113
- requiredBillingContactFields: ['phoneNumber', 'name'],
114
106
  });
115
107
  if (error) {
116
108
  setErrors(error.code + ' - ' + error.message);
@@ -528,10 +528,10 @@ const AddressFormUI = (props: AddressFormParams) => {
528
528
  titleAlign={'center'}
529
529
  onActionLeft={goToBack}
530
530
  showCall={false}
531
- btnStyle={{ paddingLeft: 0 }}
531
+ btnStyle={{ paddingLeft: 0, paddingRight: 5 }}
532
532
  style={{ marginTop: Platform.OS === 'ios' ? 0 : 10 }}
533
533
  titleWrapStyle={{ paddingHorizontal: 0, width: '100%' }}
534
- titleStyle={{ marginRight: 0, marginLeft: 0 }}
534
+ titleStyle={{ marginRight: 0, marginLeft: 0, paddingRight: 5 }}
535
535
  />
536
536
  </View>
537
537
  <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
@@ -8,8 +8,8 @@ export const WrapHeader = styled.View`
8
8
  export const TopActions = styled.TouchableOpacity`
9
9
  height: 60px;
10
10
  justify-content: center;
11
- padding-horizontal: 30px;
12
- width: 100px;
11
+ min-width: 30px;
12
+ padding-right: 15px;
13
13
  `;
14
14
 
15
15
  export const TopHeader = styled.View`
@@ -393,7 +393,9 @@ const SignupFormUI = (props: SignupParams) => {
393
393
  vibrateApp()
394
394
  return
395
395
  }
396
- formState.result?.result && showToast(ToastType.Error, t(`${formState.result?.result[0]}`, 'Phone number already used'));
396
+ formState.result?.result && formState.result?.result[0]?.includes("_") ?
397
+ showToast(ToastType.Error, t(`${formState.result?.result[0]}`, 'Phone number already used')) :
398
+ showToast(ToastType.Error, formState.result?.result[0])
397
399
  formState.result?.result && vibrateApp()
398
400
  setIsLoadingVerifyModal(false);
399
401
  }