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

@@ -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>