@timardex/cluemart-shared 1.4.6 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1287,13 +1287,16 @@ var useAddParticipantToChat = () => {
1287
1287
  return { addParticipantToChat, error, loading };
1288
1288
  };
1289
1289
  var useRemoveParticipantFromChat = () => {
1290
- const [removeParticipantFromChat, { loading, error }] = (0, import_client11.useMutation)(
1291
- REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,
1292
- {
1293
- awaitRefetchQueries: true,
1294
- refetchQueries: [{ query: USER_CHATS }]
1290
+ const [removeParticipantFromChat, { loading, error }] = (0, import_client11.useMutation)(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {
1291
+ awaitRefetchQueries: true,
1292
+ refetchQueries: (mutationResult) => {
1293
+ const region = mutationResult?.data?.removeParticipantFromChat?.region;
1294
+ return [
1295
+ { query: USER_CHATS },
1296
+ { query: GET_CHATS_BY_REGION, variables: { region } }
1297
+ ];
1295
1298
  }
1296
- );
1299
+ });
1297
1300
  return { error, loading, removeParticipantFromChat };
1298
1301
  };
1299
1302
  var useToggleChatMessageLike = () => {