Update ConversationProvider.tsx

This commit is contained in:
talksik
2022-06-19 08:23:43 -05:00
parent 7fd251e37e
commit 959de96874
@@ -176,8 +176,6 @@ export function ConversationProvider({ children }: { children: React.ReactNode }
if (currMemberForConversation && currMemberForConversation.memberState === 'priority') { if (currMemberForConversation && currMemberForConversation.memberState === 'priority') {
handleTuneIntoLine(conversation._id.toString()); handleTuneIntoLine(conversation._id.toString());
} }
// todo : if it's a
}, },
[setConversationMap, handleConnectToLine, handleTuneIntoLine, user], [setConversationMap, handleConnectToLine, handleTuneIntoLine, user],
); );
@@ -185,8 +183,6 @@ export function ConversationProvider({ children }: { children: React.ReactNode }
// add conversations to cache on initial fetch // add conversations to cache on initial fetch
// the two stores | persistent and socket | are decoupled // the two stores | persistent and socket | are decoupled
useEffect(() => { useEffect(() => {
console.log(fetchState.value);
if (fetchState.value?.data) { if (fetchState.value?.data) {
fetchState.value.data.forEach((conversationResult) => { fetchState.value.data.forEach((conversationResult) => {
handleAddConversationCache(conversationResult); handleAddConversationCache(conversationResult);