feature/IO-3000-messaging-sockets-migrations2 -

- testing and edge cases

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-11-21 18:44:38 -08:00
parent 8229e3593c
commit 38f13346e5
5 changed files with 270 additions and 271 deletions

View File

@@ -19,12 +19,7 @@ const mapDispatchToProps = (dispatch) => ({
setSelectedConversation: (conversationId) => dispatch(setSelectedConversation(conversationId))
});
function ChatConversationListComponent({
conversationList,
selectedConversation,
setSelectedConversation,
loadMoreConversations
}) {
function ChatConversationListComponent({ conversationList, selectedConversation, setSelectedConversation }) {
const renderConversation = (index) => {
const item = conversationList[index];
const cardContentRight = <TimeAgoFormatter>{item.updated_at}</TimeAgoFormatter>;
@@ -69,13 +64,15 @@ function ChatConversationListComponent({
);
};
// TODO: Can go back into virtuoso for additional fetch
// endReached={loadMoreConversations} // Calls loadMoreConversations when scrolled to the bottom
return (
<div className="chat-list-container">
<Virtuoso
data={conversationList}
itemContent={(index) => renderConversation(index)}
style={{ height: "100%", width: "100%" }}
endReached={loadMoreConversations} // Calls loadMoreConversations when scrolled to the bottom
/>
</div>
);