Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2076 Rev 2083
Línea 24... Línea 24...
24
  const closeModal = () => {
24
  const closeModal = () => {
25
    setContacts([])
25
    setContacts([])
26
    onClose()
26
    onClose()
27
  }
27
  }
Línea 28... Línea 28...
28
 
28
 
29
  const handleStartConversation = async (startConversationUrl, sendUrl) => {
29
  const handleStartConversation = async (startConversationUrl) => {
30
    try {
30
    try {
31
      await startConversation(startConversationUrl)
31
      const conversation = await startConversation(startConversationUrl)
32
      onComplete(sendUrl)
32
      onComplete(conversation.link_send)
33
      closeModal()
33
      closeModal()
-
 
34
    } catch (error) {
34
    } catch (error) {
35
      console.log(error)
35
      addNotification({ style: 'danger', msg: error.message })
36
      addNotification({ style: 'danger', msg: error.message })
36
    }
37
    }
Línea 37... Línea 38...
37
  }
38
  }
Línea 57... Línea 58...
57
        onChange={(e) => setSearch(e.target.value)}
58
        onChange={(e) => setSearch(e.target.value)}
58
      />
59
      />
Línea 59... Línea 60...
59
 
60
 
60
      <List sx={{ width: '100%' }}>
61
      <List sx={{ width: '100%' }}>
61
        {contacts.map((user) => {
62
        {contacts.map((user) => {
Línea 62... Línea 63...
62
          const { image, name, link_open_or_create, link_send } = user
63
          const { image, name, link_open_or_create } = user
63
 
64
 
64
          return (
65
          return (
65
            <ListItem key={name} disablePadding disableRipple>
66
            <ListItem key={name} disablePadding disableRipple>
66
              <ListItemButton
-
 
67
                disableRipple
67
              <ListItemButton
68
                onClick={() =>
-
 
69
                  handleStartConversation(link_open_or_create, link_send)
68
                disableRipple
70
                }
69
                onClick={() => handleStartConversation(link_open_or_create)}
71
              >
70
              >
72
                <ListItemAvatar>
71
                <ListItemAvatar>