Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 2000 Rev 2001
Línea 59... Línea 59...
59
        window.location.href = '/signout';
59
        window.location.href = '/signout';
60
    }
60
    }
61
    const handleSubmit = async (e) => {
61
    const handleSubmit = async (e) => {
62
        try {
62
        try {
63
            e.preventDefault()
63
            e.preventDefault()
-
 
64
            console.log('>>: e >', e)
64
            setLoading(true)
65
            setLoading(true)
65
            const res = await axios.post('/account-settings/delete-account');
66
            // const res = await axios.post('/account-settings/delete-account');
66
            handleAlert(res.data.success, res.data.data.message)
67
            // handleAlert(res.data.success, res.data.data.message)
67
            if(res.data.success){
68
            // if(res.data.success){
68
                logout()
69
            //     logout()
69
            }
70
            // }
70
        } catch (error) {
71
        } catch (error) {
71
            handleAlert(false, 'Disculpe, ha ocurrido un error')
72
            handleAlert(false, 'Disculpe, ha ocurrido un error')
72
            console.log('>>: error > ', error)
73
            console.log('>>: error > ', error)
73
        }finally{
74
        }finally{
74
            setLoading(false)
75
            setLoading(false)