Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 6312 Rev 6313
Línea 21... Línea 21...
21
        axios.post(websiteUrl, data)
21
        axios.post(websiteUrl, data)
22
            .then(({ data }) => {
22
            .then(({ data }) => {
23
                if (!data.success) {
23
                if (!data.success) {
24
                    return setError(data.data)
24
                    return setError(data.data)
25
                }
25
                }
26
                action(data.data)
26
                action(data.data.website)
27
            })
27
            })
28
            .then(()=>{
28
            .then(() => {
29
                setError(null)
29
                setError(null)
30
                closeModal()
30
                closeModal()
31
            })
31
            })
32
            .catch((err) => console.log(err))
32
            .catch((err) => console.log(err))
33
    }
33
    }
Línea 34... Línea 34...
34
 
34
 
35
    useEffect(() => {
35
    useEffect(() => {
36
        getData(websiteUrl)
36
        getData(websiteUrl)
37
            .then(resp => {
37
            .then(({ website }) => {
38
                setValue("website", resp)
-
 
39
                console.log(resp)
38
                setValue("website", website)
40
            })
39
            })
41
            .catch(err => console.log(err))
40
            .catch(err => console.log(err))
Línea 42... Línea 41...
42
    }, []);
41
    }, []);