ordering-ui-react-native 0.17.44-release → 0.17.45-release

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.17.44-release",
3
+ "version": "0.17.45-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -7,7 +7,7 @@ import { Wrapper } from './styles'
7
7
 
8
8
  import { PhoneInputParams } from '../../types';
9
9
  import { OText } from '../shared';
10
- import {transformCountryCode} from '../../utils'
10
+ import {transformCountryCode, verifyCountryCode} from '../../utils'
11
11
  import {I18nManager} from 'react-native'
12
12
  import { useTheme } from 'styled-components/native';
13
13
 
@@ -88,7 +88,11 @@ export const PhoneInputNumber = (props: PhoneInputParams) => {
88
88
  <PhoneInput
89
89
  ref={phoneInput}
90
90
  defaultValue={userphoneNumber || defaultValue}
91
- defaultCode={defaultCode ? transformCountryCode(defaultCode) : configs?.default_country_code?.value}
91
+ defaultCode={defaultCode ?
92
+ !isNaN(defaultCode)
93
+ ? transformCountryCode(defaultCode)
94
+ : verifyCountryCode(defaultCode)
95
+ : verifyCountryCode(configs?.default_country_code?.value)}
92
96
  onChangeFormattedText={(text : string) => handleChangeNumber(text)}
93
97
  withDarkTheme
94
98
  textInputStyle={{textAlign: I18nManager.isRTL ? 'right' : 'left'}}
@@ -380,12 +380,14 @@ const LoginFormUI = (props: LoginParams) => {
380
380
  );
381
381
 
382
382
  const note = (
383
- <OText size={24} mBottom={18}>
384
- {t('IF_NOT_HAVE_ACCOUNT', 'If you don\'t have and account, please contact Ordering')}&nbsp;
385
- <OText size={24} mBottom={18} color={theme.colors.skyBlue}>
386
- {t('SUPPORT_DEPARTMENT', 'support department')}
383
+ useRootPoint && (
384
+ <OText size={24} mBottom={18}>
385
+ {t('IF_NOT_HAVE_ACCOUNT', 'If you don\'t have and account, please contact Ordering')}&nbsp;
386
+ <OText size={24} mBottom={18} color={theme.colors.skyBlue}>
387
+ {t('SUPPORT_DEPARTMENT', 'support department')}
388
+ </OText>
387
389
  </OText>
388
- </OText>
390
+ )
389
391
  )
390
392
 
391
393
  return (