ordering-components-external 13.2.31 → 13.2.32

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-components-external",
3
- "version": "13.2.31",
3
+ "version": "13.2.32",
4
4
  "description": "Ordering Internal Dashboard",
5
5
  "main": "./_modules/index.js",
6
6
  "scripts": {
@@ -49,7 +49,7 @@ export const SignupForm = (props) => {
49
49
 
50
50
  const useSignUpOtpEmail = configs?.email_otp_signup_enabled?.value === '1' && !isCustomerMode
51
51
  const useSignUpOtpCellphone = configs?.phone_otp_signup_enabled?.value === '1' && !isCustomerMode
52
- const useSignUpOtpWhatsapp = configs?.whatsapp_otp_signup_enabled?.value === '1' && !isCustomerMode
52
+ const useSignUpOtpWhatsapp = configs?.whatsapp_otp_login_enabled?.value === '1' && !isCustomerMode
53
53
  const useSignUpFullDetails = (useSignUpOtpEmail || useSignUpOtpCellphone || useSignUpOtpWhatsapp) ? configs?.full_details_signup_enabled?.value === '1' : true
54
54
 
55
55
  const defaultSignUpTab = useSignUpFullDetails ? 'default' : useSignUpOtpEmail ? 'otpEmail' : 'otpCellphone'
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from 'react'
2
2
  import { useSession } from '../../contexts/SessionContext'
3
3
  import { useApi } from '../../contexts/ApiContext'
4
+ import { useConfig } from '../../contexts/ConfigContext'
4
5
  import { useWebsocket } from '../../contexts/WebsocketContext'
5
6
 
6
7
  /**
@@ -14,6 +15,8 @@ export const UserVerification = (props) => {
14
15
  const [ordering] = useApi()
15
16
  const socket = useWebsocket()
16
17
  const [{ user, token }, { changeUser }] = useSession()
18
+ const [{ configs }] = useConfig()
19
+ const useWhatsappVerification = configs?.whatsapp_otp_login_enabled?.value === '1'
17
20
 
18
21
  const [verifyEmailState, setVerifyEmailState] = useState({
19
22
  loadingSendCode: false,
@@ -235,6 +238,7 @@ export const UserVerification = (props) => {
235
238
  checkVerifyEmailCode={checkVerifyEmailCode}
236
239
  checkVerifyPhoneCode={checkVerifyPhoneCode}
237
240
  cleanErrorsState={cleanErrorsState}
241
+ useWhatsappVerification={useWhatsappVerification}
238
242
  />
239
243
  )}
240
244
  </>