Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1996 Rev 1997
Línea 30... Línea 30...
30
    const handleGetCode  = async () => {
30
    const handleGetCode  = async () => {
31
        try {
31
        try {
32
            setShowInputCode(true)
32
            setShowInputCode(true)
33
            setLoading(true)
33
            setLoading(true)
34
            const res = await axios.get('/account-settings/delete-account');
34
            const res = await axios.get('/account-settings/delete-account');
35
            handleAlert(res.data.success, res.data.message)
35
            handleAlert(res.data.success, res.data.data.message)
36
        } catch (error) {
36
        } catch (error) {
37
            handleAlert(false, 'Disculpe, ha ocurrido un error')
37
            handleAlert(false, 'Disculpe, ha ocurrido un error')
38
            console.log('>>: error > ', error)
38
            console.log('>>: error > ', error)
39
        }finally{
39
        }finally{
40
            setLoading(false)
40
            setLoading(false)
Línea 43... Línea 43...
43
 
43
 
44
    const resendCode = async () => {
44
    const resendCode = async () => {
45
        try {
45
        try {
46
            setLoading(true)
46
            setLoading(true)
47
            const res = await axios.get('/account-settings/delete-account');
47
            const res = await axios.get('/account-settings/delete-account');
48
            handleAlert(res.data.success, res.data.message)
48
            handleAlert(res.data.success, res.data.data.message)
49
            console.log('>>: resend code > ', res)
49
            console.log('>>: resend code > ', res)
50
        } catch (error) {
50
        } catch (error) {
51
            handleAlert(false, 'Disculpe, ha ocurrido un error')
51
            handleAlert(false, 'Disculpe, ha ocurrido un error')
52
            console.log('>>: error > ', error)
52
            console.log('>>: error > ', error)
Línea 61... Línea 61...
61
    const handleSubmit = async (e) => {
61
    const handleSubmit = async (e) => {
62
        try {
62
        try {
63
            e.preventDefault()
63
            e.preventDefault()
64
            setLoading(true)
64
            setLoading(true)
65
            const res = await axios.post('/account-settings/delete-account');
65
            const res = await axios.post('/account-settings/delete-account');
66
            handleAlert(res.data.success, res.data.message)
66
            handleAlert(res.data.success, res.data.data.message)
67
            if(res.data.success){
67
            if(res.data.success){
68
                redirectToDashboard()
68
                redirectToDashboard()
69
            }
69
            }
70
        } catch (error) {
70
        } catch (error) {
71
            handleAlert(false, 'Disculpe, ha ocurrido un error')
71
            handleAlert(false, 'Disculpe, ha ocurrido un error')