Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7333 Rev 7334
Línea 57... Línea 57...
57
  const handleLogout = (e) => {
57
  const handleLogout = (e) => {
58
    e.preventDefault()
58
    e.preventDefault()
59
    axios
59
    axios
60
      .get('/signout')
60
      .get('/signout')
61
      .then((response) => {
61
      .then((response) => {
62
        if (response.status === 200) {
62
        if (response.status === 302) {
63
          dispatch(logout())
63
          dispatch(logout())
64
        }
64
        }
65
      })
65
      })
66
      .catch(() => {
66
      .catch((err) => {
67
        dispatch(
67
        dispatch(
68
          addNotification({
68
          addNotification({
69
            style: 'danger',
69
            style: 'danger',
70
            message: 'Error interno. Intente más tarde.',
70
            message: 'Error interno. Intente más tarde.',
71
          })
71
          })
72
        )
72
        )
73
        throw new Error()
73
        throw new Error(err)
74
      })
74
      })
75
  }
75
  }
Línea 76... Línea 76...
76
 
76
 
77
  useEffect(() => {
77
  useEffect(() => {