Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1975 Rev 1976
Línea 19... Línea 19...
19
  const dispatch = useDispatch()
19
  const dispatch = useDispatch()
Línea 20... Línea 20...
20
 
20
 
Línea 21... Línea 21...
21
  const { register, handleSubmit, getValues, setValue, errors } = useForm()
21
  const { register, handleSubmit, getValues, setValue, errors } = useForm()
-
 
22
 
22
 
23
  const onSubmit = handleSubmit((data) => {
23
  const onSubmit = handleSubmit((data) => {
24
    console.log(data)
Línea 24... Línea 25...
24
    axios.post(url, data).then((response) => {
25
    axios.post(url, data).then((response) => {
25
      const { data, success } = response.data
26
      const { data, success } = response.data
Línea 116... Línea 117...
116
  }, [url, show, isEdit, questionsCategories])
117
  }, [url, show, isEdit, questionsCategories])
Línea 117... Línea 118...
117
 
118
 
118
  useEffect(() => {
119
  useEffect(() => {
119
    if (!show) {
120
    if (!show) {
120
      setCurrentCategories([])
121
      setCurrentCategories([])
121
      setValue('category_id', [])
122
      setValue('category_id[]', [])
122
      setValue('description', '')
123
      setValue('description', '')
123
      setValue('title', '')
124
      setValue('title', '')
124
    }
125
    }