Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7247 Rev 7248
Línea 1... Línea 1...
1
import React from 'react'
1
import React, { useState } from 'react'
2
import { useSelector } from 'react-redux'
2
import { useSelector } from 'react-redux'
3
import styled, { css } from 'styled-components'
3
import styled, { css } from 'styled-components'
4
import Avatar from '@mui/material/Avatar'
4
import Avatar from '@mui/material/Avatar'
Línea 5... Línea 5...
5
 
5
 
Línea 80... Línea 80...
80
const List = ({
80
const List = ({
81
  contacts = [],
81
  contacts = [],
82
  onChange = () => null,
82
  onChange = () => null,
83
  currentConversation,
83
  currentConversation,
84
}) => {
84
}) => {
-
 
85
  const [isCurrent, setIsCurrent] = useState(false)
85
  const labels = useSelector(({ intl }) => intl.labels)
86
  const labels = useSelector(({ intl }) => intl.labels)
Línea 86... Línea 87...
86
 
87
 
87
  return (
88
  return (
88
    <ContactList>
89
    <ContactList>
89
      {!contacts.length ? (
90
      {!contacts.length ? (
90
        <EmptySection message={labels.datatable_szerorecords} />
91
        <EmptySection message={labels.datatable_szerorecords} />
91
      ) : (
92
      ) : (
-
 
93
        contacts.map((contact) => {
92
        contacts.map((contact) => {
94
          if (currentConversation && currentConversation.id === contact.id) {
93
          let isCurrent = false
95
            setIsCurrent(true)
-
 
96
          }
94
 
97
          if (
95
          if (currentConversation) {
98
            currentConversation &&
-
 
99
            currentConversation.uuid === contact.uuid
96
            if (currentConversation.id === contact.id) isCurrent = true
100
          ) {
97
            if (currentConversation.uuid === contact.uuid) isCurrent = true
101
            setIsCurrent(true)
Línea 98... Línea 102...
98
          }
102
          }
99
 
103
 
100
          return (
104
          return (