ordering-ui-react-native 0.21.75 → 0.21.77

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.21.75",
3
+ "version": "0.21.77",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -46,7 +46,8 @@ const ProfileUI = (props: ProfileParams) => {
46
46
  toggleIsEdit,
47
47
  cleanFormState,
48
48
  handleToggleAvalaibleStatusDriver,
49
- isAlsea
49
+ isAlsea,
50
+ isHideDriverStatus
50
51
  } = props;
51
52
 
52
53
  const [{ user, sessionLoading }] = useSession();
@@ -56,8 +57,6 @@ const ProfileUI = (props: ProfileParams) => {
56
57
  const { errors } = useForm();
57
58
  const theme = useTheme();
58
59
 
59
- const isShowDriverStatus = user?.level === 4 && (props.isShowDriverStatus || (!props.isShowDriverStatus && !userState?.result?.result?.available))
60
-
61
60
  const [phoneInputData, setPhoneInputData] = useState({
62
61
  error: '',
63
62
  phone: {
@@ -362,7 +361,7 @@ const ProfileUI = (props: ProfileParams) => {
362
361
  />
363
362
  </CenterView>
364
363
 
365
- {isShowDriverStatus && (
364
+ {user?.level === 4 && !isHideDriverStatus && (
366
365
  <EnabledStatusDriver>
367
366
  <View style={{ flex: 1 }}>
368
367
  <OText
@@ -390,7 +389,7 @@ const ProfileUI = (props: ProfileParams) => {
390
389
  !userState?.result?.result?.available,
391
390
  )
392
391
  }
393
- disabled={userState?.loading || userState?.result?.result?.available}
392
+ disabled={userState?.loading}
394
393
  animationSpeed={200}
395
394
  />
396
395
  )}
@@ -57,7 +57,7 @@ export interface ProfileParams {
57
57
  showField?: any;
58
58
  isRequiredField?: any;
59
59
  isAlsea?: boolean;
60
- isShowDriverStatus?: boolean;
60
+ isHideDriverStatus?: boolean;
61
61
  isFocused?: boolean;
62
62
  }
63
63
 
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect, useCallback, useRef } from 'react';
2
- import { View, StyleSheet, TouchableOpacity, Platform, I18nManager, ScrollView, Keyboard, BackHandler } from 'react-native';
2
+ import { View, StyleSheet, TouchableOpacity, Platform, I18nManager, ScrollView, Keyboard, BackHandler, SafeAreaView } from 'react-native';
3
3
  import { initStripe, useConfirmPayment } from '@stripe/stripe-react-native';
4
4
  import NativeStripeSdk from '@stripe/stripe-react-native/src/NativeStripeSdk'
5
5
  import Picker from 'react-native-country-picker-modal';
@@ -448,9 +448,9 @@ const CheckoutUI = (props: any) => {
448
448
 
449
449
  return (
450
450
  <>
451
- <View style={styles.wrapperNavbar}>
452
- <TopHeader>
453
- <>
451
+ <SafeAreaView style={{ backgroundColor: theme.colors.backgroundPage }}>
452
+ <View style={styles.wrapperNavbar}>
453
+ <TopHeader>
454
454
  <TopActions onPress={() => onNavigationRedirect('BottomTab', { screen: 'Cart' }, !props.fromMulti)}>
455
455
  <IconAntDesign
456
456
  name='arrowleft'
@@ -468,10 +468,10 @@ const CheckoutUI = (props: any) => {
468
468
  {t('CHECKOUT', 'Checkout')}
469
469
  </OText>
470
470
  )}
471
- </>
472
- </TopHeader>
473
- </View>
474
- <Container forwardRef={containerRef} noPadding onScroll={handleScroll}>
471
+ </TopHeader>
472
+ </View>
473
+ </SafeAreaView>
474
+ <Container pt={0} forwardRef={containerRef} noPadding onScroll={handleScroll}>
475
475
  <View style={styles.wrapperNavbar}>
476
476
  <NavBar
477
477
  hideArrowLeft