Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3142 Rev 3143
Línea 11... Línea 11...
11
    xmpp_username,
11
    xmpp_username,
12
    xmpp_password,
12
    xmpp_password,
13
    xmpp_domain
13
    xmpp_domain
14
    // xmpp_port
14
    // xmpp_port
15
  } = useSelector((state) => state.auth)
15
  } = useSelector((state) => state.auth)
16
  const isAuth = useSelector((state) => state.auth.isAuth)
-
 
Línea 17... Línea 16...
17
 
16
 
18
  useLayoutEffect(() => {
17
  useLayoutEffect(() => {
Línea 19... Línea -...
19
    const converse = window.converse
-
 
20
 
-
 
21
    if (!isAuth) {
-
 
22
      converse.connection?.disconnect()
-
 
23
    }
18
    const converse = window.converse
24
 
19
 
25
    if (!xmpp_hostname || !xmpp_username || !xmpp_password || !xmpp_domain) {
20
    if (!xmpp_hostname || !xmpp_username || !xmpp_password || !xmpp_domain) {
Línea 26... Línea 21...
26
      return
21
      return
Línea 47... Línea 42...
47
    })
42
    })
Línea 48... Línea 43...
48
 
43
 
49
    return () => {
44
    return () => {
50
      converse.connection?.disconnect()
45
      converse.connection?.disconnect()
51
    }
46
    }
Línea 52... Línea 47...
52
  }, [xmpp_hostname, xmpp_password, xmpp_username, isAuth])
47
  }, [xmpp_hostname, xmpp_password, xmpp_username])
53
 
48