Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5337 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
5334 stevensc 1
/* eslint-disable react/prop-types */
2
import React from 'react'
3
import Spinner from '../../shared/loading-spinner/Spinner'
4
import Message from './Message'
5
 
6
const ChatList = ({
7
  messages = [],
8
  currentPage = 1,
9
  lastPage = 1,
10
  conversationList = null,
11
  loader = null
12
}) => {
13
  return (
14
        <div className="chat-conversation" ref={conversationList}>
15
            <ul className="conversation-list">
16
                {currentPage < lastPage &&
17
                    <li className='position-relative' ref={loader}>
18
                        <Spinner />
19
                    </li>
20
                }
21
                {messages.map((message) => (
22
                    <li key={message.id}>
23
                        <Message message={message} />
24
                    </li>
25
                ))}
26
            </ul>
27
        </div>
28
  )
29
}
30
 
31
export default ChatList