Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3396 Rev 3406
Línea 62... Línea 62...
62
 
62
 
63
  const handleLogout = async (e) => {
63
  const handleLogout = async (e) => {
64
    e.preventDefault()
64
    e.preventDefault()
65
    try {
65
    try {
66
      const response = await dispatch(asyncLogout())
-
 
67
      window.localStorage.removeItem('jwt')
-
 
68
      window.localStorage.removeItem('is_logged_in')
66
      const response = await dispatch(asyncLogout())
69
      dispatch(addNotification({ style: 'success', msg: response.message }))
67
      dispatch(addNotification({ style: 'success', msg: response.message }))
70
    } catch (error) {
68
    } catch (error) {
71
      dispatch(addNotification({ style: 'danger', msg: error.message }))
69
      dispatch(addNotification({ style: 'danger', msg: error.message }))
72
    }
70
    }