feature/IO-3000-messaging-sockets-migrations2 -
- testing and edge cases Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -77,17 +77,6 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
|
||||
});
|
||||
}, [chatVisible, getConversations]);
|
||||
|
||||
const loadMoreConversations = useCallback(() => {
|
||||
if (data)
|
||||
fetchMore({
|
||||
variables: {
|
||||
offset: data.conversations.length
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.error(`Error fetching more conversations: ${(err, err.message || "")}`);
|
||||
});
|
||||
}, [data, fetchMore]);
|
||||
|
||||
const unreadCount = unreadData?.messages_aggregate?.aggregate?.count || 0;
|
||||
|
||||
return (
|
||||
@@ -114,10 +103,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
|
||||
{loading ? (
|
||||
<LoadingSpinner />
|
||||
) : (
|
||||
<ChatConversationListComponent
|
||||
conversationList={data ? data.conversations : []}
|
||||
loadMoreConversations={loadMoreConversations}
|
||||
/>
|
||||
<ChatConversationListComponent conversationList={data ? data.conversations : []} />
|
||||
)}
|
||||
</Col>
|
||||
<Col span={16}>{selectedConversation ? <ChatConversationContainer /> : null}</Col>
|
||||
|
||||
Reference in New Issue
Block a user