Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1983 Rev 1989
Línea 1... Línea 1...
1
import React,  { useState, useMemo } from 'react';
1
import React,  { useState, useMemo } from 'react';
2
import Spinner from '../../../shared/loading-spinner/Spinner';
2
import Spinner from '../../../shared/loading-spinner/Spinner';
3
import styled from 'styled-components';
3
import styled from 'styled-components';
-
 
4
import axios from '../../../utils/axios';
Línea 4... Línea 5...
4
 
5
 
5
const StyledSpinnerContainer = styled.div`
6
const StyledSpinnerContainer = styled.div`
6
  position: absolute;
7
  position: absolute;
7
  left: 0;
8
  left: 0;
Línea 15... Línea 16...
15
  z-index: 300;
16
  z-index: 300;
16
`;
17
`;
17
function CloseAccount() {
18
function CloseAccount() {
18
    const [showInputCode, setShowInputCode] = useState(false);
19
    const [showInputCode, setShowInputCode] = useState(false);
19
    const [loading, setLoading] = useState(false);
20
    const [loading, setLoading] = useState(false);
20
    const handleGetCode  = () => {
21
    const handleGetCode  = async () => {
21
        try {
22
        try {
-
 
23
            const res = await axios.get('/account-settings/deleteAccount');
-
 
24
            console.log('>>: res > ', res)
22
            setShowInputCode(true)
25
            // setShowInputCode(true)
23
            console.log('>>: get code')        
26
            console.log('>>: get code')        
24
        } catch (error) {
27
        } catch (error) {
25
            console.log('>>: error > ', error)
28
            console.log('>>: error > ', error)
26
        }
29
        }
27
    }
30
    }