Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6513 | Rev 6532 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 6513 Rev 6531
Línea 24... Línea 24...
24
  const reCaptchaToken = useRef('')
24
  const reCaptchaToken = useRef('')
25
  const reCaptchaInstance = useRef(null)
25
  const reCaptchaInstance = useRef(null)
Línea 26... Línea 26...
26
 
26
 
Línea -... Línea 27...
-
 
27
  const dispatch = useDispatch()
-
 
28
 
27
  const dispatch = useDispatch()
29
  const {
-
 
30
    register,
-
 
31
    handleSubmit,
-
 
32
    errors,
-
 
33
    setError,
-
 
34
    getValues,
28
 
35
    setValue,
Línea 29... Línea 36...
29
  const { register, handleSubmit, errors, setError, getValues, setValue } =
36
    reset,
30
    useForm({ mode: 'onBlur' })
37
  } = useForm({ mode: 'onBlur' })
31
 
38
 
Línea 61... Línea 68...
61
          }
68
          }
62
          dispatch(addNotification({ style: 'danger', msg: data }))
69
          dispatch(addNotification({ style: 'danger', msg: data }))
63
          return
70
          return
64
        }
71
        }
Línea -... Línea 72...
-
 
72
 
65
 
73
        reset()
66
        dispatch(login())
-
 
67
        event.target.reset()
74
        dispatch(login())
68
      })
75
      })
69
      .catch((err) => {
76
      .catch((err) => {
70
        dispatch(
77
        dispatch(
71
          addNotification({
78
          addNotification({
Línea 74... Línea 81...
74
          })
81
          })
75
        )
82
        )
76
        console.log(`Error: ${err}`)
83
        console.log(`Error: ${err}`)
77
        throw new Error(err)
84
        throw new Error(err)
78
      })
85
      })
-
 
86
      .finally(() => {
79
      .finally(() => setIsLoading(false))
87
        setIsLoading(false)
80
 
-
 
81
    reCaptchaInstance.current.reset()
88
        reCaptchaInstance.current.reset()
82
    loginExpiredCallbackHandler()
89
        loginExpiredCallbackHandler()
83
    setValue('password', '')
90
        setValue('password', '')
-
 
91
      })
84
  }
92
  }
Línea 85... Línea 93...
85
 
93
 
86
  const loginVerifyCallbackHandler = (response) => {
94
  const loginVerifyCallbackHandler = (response) => {
87
    reCaptchaToken.current = response
95
    reCaptchaToken.current = response