Remove 'retry' if successful response
This commit is contained in:
parent
0105458c22
commit
f269b754f0
1 changed files with 1 additions and 1 deletions
|
@ -85,8 +85,8 @@ const Chat: React.FC<ChatInterface> = ({ chat, inputRef, className }) => {
|
|||
queryClient.setQueryData(['chats', 'messages', chat.id], context.prevChatMessages);
|
||||
setErrorSubmittingMessage(true);
|
||||
},
|
||||
// Always refetch after error or success:
|
||||
onSuccess: () => {
|
||||
setErrorSubmittingMessage(false);
|
||||
queryClient.invalidateQueries(ChatKeys.chatMessages(chat.id));
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue