Skip to content

Commit

Permalink
fix: refetch data after gui action delete
Browse files Browse the repository at this point in the history
  • Loading branch information
mbacherycz committed Feb 24, 2025
1 parent 87a9fdf commit ab87534
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/frontend/src/api/useDialogByIdSubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const useDialogByIdSubscription = (dialogId: string | undefined, dialogTo
if (updatedType && updatedType === DialogEventType.DialogDeleted) {
// Redirect to inbox if the dialog was deleted
navigate(PageRoutes.inbox);
void queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.DIALOGS] });
} else if (updatedType && updatedType === DialogEventType.DialogUpdated) {
void queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.DIALOG_BY_ID] });
}
Expand Down

0 comments on commit ab87534

Please sign in to comment.