diff --git a/src/components/UserPortal/ChatRoom/ChatRoom.test.tsx b/src/components/UserPortal/ChatRoom/ChatRoom.test.tsx index cfe430a589..96290f4e16 100644 --- a/src/components/UserPortal/ChatRoom/ChatRoom.test.tsx +++ b/src/components/UserPortal/ChatRoom/ChatRoom.test.tsx @@ -41,7 +41,6 @@ const MESSAGE_SENT_TO_CHAT_MOCK = [ }, result: { data: { - messageSentToChat: { _id: '668ec1f1364e03ac47a151', createdAt: '2024-07-10T17:16:33.248Z', diff --git a/src/components/UserPortal/ChatRoom/ChatRoom.tsx b/src/components/UserPortal/ChatRoom/ChatRoom.tsx index e41cc98ca2..c23244a314 100644 --- a/src/components/UserPortal/ChatRoom/ChatRoom.tsx +++ b/src/components/UserPortal/ChatRoom/ChatRoom.tsx @@ -118,7 +118,6 @@ export default function chatRoom(props: InterfaceChatRoomProps): JSX.Element { }, }); - const { data: chatData, refetch: chatRefetch } = useQuery(CHAT_BY_ID, { variables: { id: props.selectedContact, @@ -169,7 +168,7 @@ export default function chatRoom(props: InterfaceChatRoomProps): JSX.Element { } else { chatRefetch({ id: messageSubscriptionData?.data.data.messageSentToChat - .chatMessageBelongsTo['_id'] + .chatMessageBelongsTo['_id'], }); } },