Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2211 Rev 2212
Línea 34... Línea 34...
34
 
34
 
35
    axios
35
    axios
36
      .get(url)
36
      .get(url)
37
      .then((response) => handleError(response))
37
      .then((response) => handleError(response))
38
      .then((data) => setData(data))
38
      .then((data) => setData(data))
39
      .catch((error) =>
39
      .catch((error) => {
-
 
40
        dispatch(addNotification({ style: 'danger', msg: error.message }))
-
 
41
 
-
 
42
        if (error.message.includes('sesión')) {
-
 
43
          window.localStorage.removeItem('jwt')
-
 
44
          window.localStorage.removeItem('aes')
-
 
45
          window.location.reload()
40
        dispatch(addNotification({ style: 'danger', msg: error.message }))
46
        }
41
      )
47
      })
42
      .finally(() => setIsLoading(false))
48
      .finally(() => setIsLoading(false))
Línea 43... Línea 49...
43
  }
49
  }
44
 
50