mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
Merge branch '634-issue---logout-is-not-shared-cross-tabs' into 612-disconnect-from-ws-on-logout
This commit is contained in:
commit
941f9c8c94
@ -59,7 +59,7 @@ export const useLogout = (
|
||||
const { logoutRedirection } = useLogoutRedirection();
|
||||
const { toast } = useToast();
|
||||
const { t } = useTranslate();
|
||||
const postDisconnectionSignal = useBroadcastChannel("session");
|
||||
const broadcastLogoutAcrossTabs = useBroadcastChannel("session");
|
||||
|
||||
return useMutation({
|
||||
...options,
|
||||
@ -70,7 +70,7 @@ export const useLogout = (
|
||||
},
|
||||
onSuccess: async () => {
|
||||
queryClient.removeQueries([CURRENT_USER_KEY]);
|
||||
postDisconnectionSignal("logout");
|
||||
broadcastLogoutAcrossTabs("logout");
|
||||
await logoutRedirection();
|
||||
toast.success(t("message.logout_success"));
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user