Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3293 Rev 3295
Línea 1... Línea 1...
1
import React, { useLayoutEffect } from 'react'
1
import React, { useLayoutEffect } from 'react'
-
 
2
import { useMatch } from 'react-router-dom'
2
import { useSelector } from 'react-redux'
3
import { useSelector } from 'react-redux'
3
import 'converse.js'
-
 
Línea -... Línea 4...
-
 
4
 
-
 
5
import { useMediaQuery } from '@hooks'
-
 
6
 
4
 
7
import 'converse.js'
5
import './converse.css'
8
import './converse.css'
6
import './chat.css'
-
 
Línea 7... Línea 9...
7
import { useMatch } from 'react-router-dom'
9
import './chat.css'
8
 
10
 
-
 
11
export default function Chat() {
Línea 9... Línea 12...
9
export default function Chat() {
12
  const match = useMatch('/habits/*')
10
  const match = useMatch('/habits/*')
13
  const isMobile = useMediaQuery('(max-width: 900px)')
11
 
14
 
12
  const {
15
  const {
Línea 47... Línea 50...
47
    return () => {
50
    return () => {
48
      converse.connection?.disconnect()
51
      converse.connection?.disconnect()
49
    }
52
    }
50
  }, [xmpp_hostname, xmpp_password, xmpp_username])
53
  }, [xmpp_hostname, xmpp_password, xmpp_username])
Línea 51... Línea 54...
51
 
54
 
Línea 52... Línea 55...
52
  if (match) return null
55
  if (match && isMobile) return null
53
 
56