Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1971 Rev 1979
Línea 16... Línea 16...
16
}) => {
16
}) => {
17
  const labels = useSelector(({ intl }) => intl.labels)
17
  const labels = useSelector(({ intl }) => intl.labels)
18
  const { register, handleSubmit, errors } = useForm()
18
  const { register, handleSubmit, errors } = useForm()
Línea 19... Línea 19...
19
 
19
 
-
 
20
  const onSubmitHandler = handleSubmit(async (data) => {
-
 
21
    const formData = new FormData()
-
 
22
    Object.entries(data).map(([key, value]) => formData.append(key, value))
20
  const onSubmitHandler = handleSubmit(async (data) => {
23
 
21
    axios
24
    axios
22
      .post('/profile/my-profiles/add', data)
25
      .post('/profile/my-profiles/add', formData)
23
      .then(({ data: response }) => {
26
      .then(({ data: response }) => {
Línea 24... Línea 27...
24
        const { data, success } = response
27
        const { data, success } = response
25
 
28