ordering-ui-react-native 0.16.50 → 0.16.51

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.16.50",
3
+ "version": "0.16.51",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -61,6 +61,17 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
61
61
  }
62
62
  }, [formState])
63
63
 
64
+ useEffect(() => {
65
+ const _changes = order?.products.map(product => {
66
+ return {
67
+ product_id: product?.product_id,
68
+ comment: '',
69
+ qualification: 5
70
+ }
71
+ })
72
+ handleChangeFormState(_changes)
73
+ }, [])
74
+
64
75
  return (
65
76
  <>
66
77
  <ReviewProductsContainer>
@@ -69,7 +69,7 @@ export const SingleProductReview = (props: SingleProductReviewParams) => {
69
69
  }
70
70
 
71
71
  useEffect(() => {
72
- if (comments?.length === 0 && !extraComment && formState.changes?.length === 0 && qualification === 5) return
72
+ if (comments?.length === 0 && !extraComment) return
73
73
  let _comments = ''
74
74
  if (comments.length > 0) {
75
75
  comments.map(comment => (_comments += comment.content + '. '))
@@ -443,36 +443,38 @@ const SignupFormUI = (props: SignupParams) => {
443
443
  titleStyle={{ marginLeft: 0, marginRight: 0 }}
444
444
  />
445
445
  <FormSide>
446
- {(useSignUpFullDetails) && (
446
+ {((Number(useSignUpFullDetails) + Number(useSignUpOtpEmail) + Number(useSignUpOtpCellphone)) > 1) && (
447
447
  <SignupWith>
448
448
  <OTabs
449
449
  horizontal
450
450
  showsHorizontalScrollIndicator={false}
451
451
  ref={tabsRef}
452
452
  >
453
- <TabBtn
454
- onPress={() => handleSignUpTab('default')}
455
- onLayout={(event: any) => handleOnLayout(event, 'default')}
456
- >
457
- <OTab
458
- style={{
459
- borderBottomColor:
460
- signUpTab === 'default'
461
- ? theme.colors.textNormal
462
- : theme.colors.border,
463
- }}>
464
- <OText
465
- size={14}
466
- color={
467
- signUpTab === 'default'
468
- ? theme.colors.textNormal
469
- : theme.colors.disabled
470
- }
471
- weight={signUpTab === 'default' ? 'bold' : 'normal'}>
472
- {t('DEFAULT', 'Default')}
473
- </OText>
474
- </OTab>
475
- </TabBtn>
453
+ {useSignUpFullDetails && (
454
+ <TabBtn
455
+ onPress={() => handleSignUpTab('default')}
456
+ onLayout={(event: any) => handleOnLayout(event, 'default')}
457
+ >
458
+ <OTab
459
+ style={{
460
+ borderBottomColor:
461
+ signUpTab === 'default'
462
+ ? theme.colors.textNormal
463
+ : theme.colors.border,
464
+ }}>
465
+ <OText
466
+ size={14}
467
+ color={
468
+ signUpTab === 'default'
469
+ ? theme.colors.textNormal
470
+ : theme.colors.disabled
471
+ }
472
+ weight={signUpTab === 'default' ? 'bold' : 'normal'}>
473
+ {t('DEFAULT', 'Default')}
474
+ </OText>
475
+ </OTab>
476
+ </TabBtn>
477
+ )}
476
478
  {useSignUpOtpEmail && (
477
479
  <TabBtn
478
480
  onPress={() => handleSignUpTab('otpEmail')}