Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix: prefetch query so cache gets updated when the channel name is needed (#1165)

gbirman80964a0062b4
diff --git a/js/app/packages/app/component/EntityModal/RenameView.tsx b/js/app/packages/app/component/EntityModal/RenameView.tsx
index 46706c72cd..1a960939bc 100644
--- a/js/app/packages/app/component/EntityModal/RenameView.tsx
+++ b/js/app/packages/app/component/EntityModal/RenameView.tsx
@@ -40,11 +40,11 @@ export const RenameView = (props: {
() => onMutateResult.previousData
);
},
- onSettled(_, __, _variables) {
+ onSettled(_, __, variables) {
// TODO: fix the backend so that the /channels/{id} endpoint returns the updated name
- // queryClient.invalidateQueries({
- // queryKey: channelKeys.withID(variables.entity.id).queryKey,
- // });
+ queryClient.prefetchQuery({
+ queryKey: channelKeys.withID(variables.entity.id).queryKey,
+ });
},
});
let inputRef: HTMLInputElement | undefined;