Skip to content

Commit

Permalink
Update AppContext.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Jun 19, 2024
1 parent 1e084c2 commit 35dc58d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions web-app/src/context/AppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,10 @@ export const AppContextProvider = ({ children }: AppContextProviderProps) => {
try {
console.log(`cID: ${cID}`);
if (!apiReady || !isConversation || !cID) return;
// if (viewedIndex?.id === id) return;
if (isFetchingRef.current) return;

isFetchingRef.current = true;

const conversation = await api!.getConversation(cID);
console.log(`conversation888:`, conversation);
setViewedConversation(conversation);
isFetchingRef.current = false;

return conversation;
} catch (error) {
console.error("Error fetching index", error);
Expand Down

0 comments on commit 35dc58d

Please sign in to comment.