Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1975 Rev 1979
Línea 1... Línea 1...
1
import React, { useEffect } from 'react'
1
import React, { useEffect} from 'react'
2
import { useLocation } from 'react-router-dom'
2
import { useLocation } from 'react-router-dom'
3
import { useDispatch } from 'react-redux'
3
import { useDispatch } from 'react-redux'
4
import { useForm } from 'react-hook-form'
4
import { useForm } from 'react-hook-form'
5
import { CKEditor } from 'ckeditor4-react'
5
import { CKEditor } from 'ckeditor4-react'
Línea 27... Línea 27...
27
      profile: `/profile/my-profiles/extended/${id}`,
27
      profile: `/profile/my-profiles/extended/${id}`,
28
      group: `/group/my-groups/extended/${id}`
28
      group: `/group/my-groups/extended/${id}`
29
    }
29
    }
30
    const type = pathname.split('/')[1]
30
    const type = pathname.split('/')[1]
Línea -... Línea 31...
-
 
31
 
-
 
32
    const formData = new FormData()
-
 
33
    formData.append('description', description)
31
 
34
 
32
    axios
35
    axios
33
      .post(typesUrl[type], { description })
36
      .post(typesUrl[type], formData)
34
      .then(({ data: responseData }) => {
37
      .then(({ data: responseData }) => {
35
        const { data, success } = responseData
38
        const { data, success } = responseData
36
        if (!success) {
39
        if (!success) {
37
          const errorMessage =
40
          const errorMessage =