From bba351ba6cc60d3b9e49026b8f2f6a3f37a4373b Mon Sep 17 00:00:00 2001 From: JF-Cozy Date: Mon, 21 Oct 2024 14:24:38 +0200 Subject: [PATCH] feat(Assistant): Remove useless ConversationQuery --- .../Conversations/ConversationQuery.jsx | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/assistant/Conversations/ConversationQuery.jsx diff --git a/src/assistant/Conversations/ConversationQuery.jsx b/src/assistant/Conversations/ConversationQuery.jsx deleted file mode 100644 index e2f4d2bc4..000000000 --- a/src/assistant/Conversations/ConversationQuery.jsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react' - -import { useQuery, isQueryLoading } from 'cozy-client' - -import { buildChatConversationQueryById, buildMyselfQuery } from '../queries' -import ChatConversation from './ChatConversation' - -const ConversationQuery = ({ id }) => { - const chatConversationQuery = buildChatConversationQueryById(id) - const { data: chatConversation, ...queryResult } = useQuery( - chatConversationQuery.definition, - chatConversationQuery.options - ) - - const myselfQuery = buildMyselfQuery() - const { data: myselves, ...queryMyselfResult } = useQuery( - myselfQuery.definition, - myselfQuery.options - ) - - const isLoading = - isQueryLoading(queryResult) || isQueryLoading(queryMyselfResult) - - if (isLoading) return null - - return ( - - ) -} - -export default ConversationQuery