Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6941 Rev 6956
Línea 145... Línea 145...
145
 
145
 
146
const Chat = ({ children }) => {
146
const Chat = ({ children }) => {
147
  return <StyledChatContainer>{children}</StyledChatContainer>
147
  return <StyledChatContainer>{children}</StyledChatContainer>
Línea 148... Línea 148...
148
}
148
}
149
 
149
 
150
const Header = ({ children, options, onClose }) => {
150
const Header = ({ children, options = [], onClose }) => {
151
  return (
151
  return (
152
    <StyledChatHeader>
152
    <StyledChatHeader>
153
      <IconButton onClick={onClose}>
153
      <IconButton onClick={onClose}>
154
        <ArrowBackIcon />
154
        <ArrowBackIcon />
155
      </IconButton>
155
      </IconButton>
156
      {children}
156
      {children}
157
      {options && <Options options={options} right="1rem" />}
157
      {!!options.length && <Options options={options} right="1rem" />}
158
    </StyledChatHeader>
158
    </StyledChatHeader>
Línea 159... Línea 159...
159
  )
159
  )
Línea 169... Línea 169...
169
      <StyledTitle>{children}</StyledTitle>
169
      <StyledTitle>{children}</StyledTitle>
170
    </a>
170
    </a>
171
  )
171
  )
172
}
172
}
Línea 173... Línea -...
173
 
-
 
174
const List = ({
173
 
175
  messages = [],
-
 
176
  pages,
-
 
177
  currentPage,
-
 
178
  onPagination,
-
 
179
  scrollRef,
-
 
180
  loading,
-
 
181
}) => {
174
const List = ({ messages = [], onPagination, scrollRef, loading }) => {
Línea 182... Línea 175...
182
  const loadMoreEl = useRef(null)
175
  const loadMoreEl = useRef(null)
183
 
176
 
Línea 196... Línea 189...
196
  return (
189
  return (
197
    <StyledMessageList ref={scrollRef}>
190
    <StyledMessageList ref={scrollRef}>
198
      {messages.map((message) => (
191
      {messages.map((message) => (
199
        <List.Message message={message} key={message.id} />
192
        <List.Message message={message} key={message.id} />
200
      ))}
193
      ))}
201
      {pages > currentPage && !loading && <p ref={loadMoreEl}>Cargando...</p>}
194
      {!loading && <p ref={loadMoreEl}>Cargando...</p>}
202
    </StyledMessageList>
195
    </StyledMessageList>
203
  )
196
  )
204
}
197
}
Línea 205... Línea 198...
205
 
198