feature/IO-3497-Ant-Design-v5-to-v6 - Checkpoint (Apollo)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { InfoCircleOutlined, MessageOutlined, ShrinkOutlined, SyncOutlined } from "@ant-design/icons";
|
||||
import { useApolloClient, useLazyQuery, useQuery } from "@apollo/client";
|
||||
import { useApolloClient, useLazyQuery, useQuery } from "@apollo/client/react";
|
||||
import { Badge, Card, Col, Row, Space, Tag, Tooltip, Typography } from "antd";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -105,9 +105,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
|
||||
|
||||
hasLoadedConversationsOnceRef.current = true;
|
||||
|
||||
getConversations({
|
||||
variables: { offset: 0 }
|
||||
}).catch((err) => {
|
||||
getConversations({ offset: 0 }).catch((err) => {
|
||||
console.error(`Error fetching conversations: ${err?.message || ""}`, err);
|
||||
});
|
||||
}, [getConversations]);
|
||||
@@ -115,9 +113,9 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
|
||||
const handleManualRefresh = async () => {
|
||||
try {
|
||||
if (called && typeof refetch === "function") {
|
||||
await refetch({ offset: 0 });
|
||||
await refetch({ variables: { offset: 0 } });
|
||||
} else {
|
||||
await getConversations({ variables: { offset: 0 } });
|
||||
await getConversations({ offset: 0 });
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Error refreshing conversations: ${err?.message || ""}`, err);
|
||||
|
||||
Reference in New Issue
Block a user