mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 13:11:12 +10:00
Show new workspace role on change
This commit is contained in:
@ -53,9 +53,10 @@ export function useChangeMemberRoleMutation() {
|
||||
return useMutation<any, Error, any>({
|
||||
mutationFn: (data) => changeMemberRole(data),
|
||||
onSuccess: (data, variables) => {
|
||||
// TODO: change in cache instead
|
||||
notifications.show({ message: "Member role updated successfully" });
|
||||
queryClient.refetchQueries({
|
||||
queryKey: ["workspaceMembers", variables.spaceId],
|
||||
queryKey: ["workspaceMembers"],
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
|
||||
Reference in New Issue
Block a user