From 11e68c3956806c31a12970790ec12cdf7264b54f Mon Sep 17 00:00:00 2001 From: ngc2207 Date: Thu, 6 Feb 2025 10:44:35 +0800 Subject: [PATCH] feat(auth): invalidate workspaces query on successful logout --- src/features/auth/api/use-logout.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/features/auth/api/use-logout.ts b/src/features/auth/api/use-logout.ts index dc7268c..6a55e46 100644 --- a/src/features/auth/api/use-logout.ts +++ b/src/features/auth/api/use-logout.ts @@ -24,6 +24,7 @@ export const useLogout = () => { toast.success("Logged out successfully"); router.refresh(); queryClient.invalidateQueries({ queryKey: ["current"] }); + queryClient.invalidateQueries({ queryKey: ["workspaces"] }); }, onError: () => { toast.error("Failed to logout");