Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 8478 Rev 8479
Línea 14... Línea 14...
14
    const { handleSubmit, register, setValue } = useForm()
14
    const { handleSubmit, register, setValue } = useForm()
15
    const [error, setError] = useState(null);
15
    const [error, setError] = useState(null);
16
    const [industries, setIndustries] = useState([]);
16
    const [industries, setIndustries] = useState([]);
17
    const [currentIndustry, setCurrentIndustry] = useState("");
17
    const [currentIndustry, setCurrentIndustry] = useState("");
Línea 18... Línea 18...
18
 
18
 
-
 
19
    const onSubmit = (data) => {
-
 
20
 
-
 
21
        console.log(data)
19
    const onSubmit = ({ industry }) => {
22
        console.log(editUrl)
20
        const data = new FormData()
23
       /*  const data = new FormData()
Línea 21... Línea 24...
21
        data.append("ndustry_id", industry)
24
        data.append("industry_id", industry)
22
 
25
 
23
        axios.post(editUrl, data)
26
        axios.post(editUrl, data)
24
            .then(({ data }) => {
27
            .then(({ data }) => {
Línea 29... Línea 32...
29
            })
32
            })
30
            .then(() => {
33
            .then(() => {
31
                setError(null)
34
                setError(null)
32
                closeModal()
35
                closeModal()
33
            })
36
            })
34
            .catch((err) => console.log(err))
37
            .catch((err) => console.log(err)) */
35
    }
38
    }
Línea 36... Línea 39...
36
 
39
 
37
    useEffect(() => {
40
    useEffect(() => {
38
        getData(editUrl)
41
        getData(editUrl)