Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1665 Rev 1760
Línea 15... Línea 15...
15
  const { showModal, type, reportUrl, onComplete } = useSelector(
15
  const { showModal, type, reportUrl, onComplete } = useSelector(
16
    (state) => state.report
16
    (state) => state.report
17
  )
17
  )
18
  const dispatch = useDispatch()
18
  const dispatch = useDispatch()
Línea 19... Línea 19...
19
 
19
 
-
 
20
  const { control, errors, getValues, handleSubmit } = useForm({
-
 
21
    defaultValues: {
-
 
22
      reason: reasons[0].value,
-
 
23
      block_user: block_options[1].value,
-
 
24
      comment: ''
-
 
25
    }
Línea 20... Línea 26...
20
  const { control, errors, getValues, handleSubmit } = useForm()
26
  })
21
 
27
 
22
  const onSubmit = handleSubmit(async () => {
28
  const onSubmit = handleSubmit(async () => {
23
    try {
29
    try {
Línea 71... Línea 77...
71
      />
77
      />
Línea 72... Línea 78...
72
 
78
 
73
      <FormInputText
79
      <FormInputText
74
        name='comment'
80
        name='comment'
75
        control={control}
-
 
76
        rules={{ required: 'Este campo es requerido' }}
81
        control={control}
77
        error={errors.comment?.message}
82
        error={errors.comment?.message}
78
        label='Comentario'
83
        label='Comentario'
79
        placeholder='(Opcional)'
84
        placeholder='(Opcional)'
80
      />
85
      />