ordering-ui-react-native 0.16.79 → 0.16.81

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.79",
3
+ "version": "0.16.81",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -33,7 +33,8 @@ const LoginFormUI = (props: LoginParams) => {
33
33
  formState,
34
34
  handleButtonLoginClick,
35
35
  useRootPoint,
36
- handleReCaptcha
36
+ handleReCaptcha,
37
+ enableReCaptcha
37
38
  } = props;
38
39
 
39
40
  const theme = useTheme()
@@ -167,7 +168,7 @@ const LoginFormUI = (props: LoginParams) => {
167
168
  }, [errors]);
168
169
 
169
170
  useEffect(() => {
170
- if (configs && Object.keys(configs).length > 0) {
171
+ if (configs && Object.keys(configs).length > 0 && enableReCaptcha) {
171
172
  if (configs?.security_recaptcha_type?.value === 'v3' &&
172
173
  configs?.security_recaptcha_score_v3?.value > 0 &&
173
174
  configs?.security_recaptcha_site_key_v3?.value
@@ -187,7 +188,7 @@ const LoginFormUI = (props: LoginParams) => {
187
188
  })
188
189
  }
189
190
  }
190
- }, [configs])
191
+ }, [configs, enableReCaptcha])
191
192
 
192
193
  const logo = (
193
194
  <LogoWrapper>
@@ -82,6 +82,7 @@ export interface LoginParams {
82
82
  handleSendVerifyCode?: any;
83
83
  handleCheckPhoneCode?: any;
84
84
  useRootPoint?: any;
85
+ enableReCaptcha?: boolean;
85
86
  handleReCaptcha?: (vlaue: any) => void;
86
87
  }
87
88
 
@@ -1031,6 +1031,7 @@ export const ProductOptionsUI = (props: any) => {
1031
1031
  disabled={
1032
1032
  maxProductQuantity <= 0 ||
1033
1033
  productCart.quantity >= maxProductQuantity ||
1034
+ productCart.quantity >= product?.maximum_per_order ||
1034
1035
  isSoldOut
1035
1036
  }>
1036
1037
  <OIcon
@@ -1039,6 +1040,7 @@ export const ProductOptionsUI = (props: any) => {
1039
1040
  color={
1040
1041
  maxProductQuantity <= 0 ||
1041
1042
  productCart.quantity >= maxProductQuantity ||
1043
+ productCart.quantity >= product?.maximum_per_order ||
1042
1044
  isSoldOut
1043
1045
  ? theme.colors.backgroundGray
1044
1046
  : theme.colors.backgroundDark
@@ -1093,7 +1095,7 @@ export const ProductOptionsUI = (props: any) => {
1093
1095
  export const ProductForm = (props: any) => {
1094
1096
  const productOptionsProps = {
1095
1097
  ...props,
1096
- productCart: { quantity: props?.product?.minimum_per_order || 1 },
1098
+ productCart: { quantity: props?.product?.maximum_per_order || 1 },
1097
1099
  UIComponent: ProductOptionsUI,
1098
1100
  };
1099
1101