Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1929 Rev 1975
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 31... Línea -...
31
 
-
 
32
    const formData = new FormData()
-
 
33
    formData.append('description', description)
-
 
34
 
31
 
35
    axios
32
    axios
36
      .post(typesUrl[type], formData)
33
      .post(typesUrl[type], { description })
37
      .then(({ data: responseData }) => {
34
      .then(({ data: responseData }) => {
38
        const { data, success } = responseData
35
        const { data, success } = responseData
39
        if (!success) {
36
        if (!success) {
40
          const errorMessage =
37
          const errorMessage =