mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 05:27:48 +00:00
fix: correct query removal call sequence in when changing organization
This commit is contained in:
@@ -183,9 +183,6 @@ export const Navbar = () => {
|
|||||||
}, [subscription, isBillingPage, isModalIntrusive]);
|
}, [subscription, isBillingPage, isModalIntrusive]);
|
||||||
|
|
||||||
const handleOrgChange = async (orgId: string) => {
|
const handleOrgChange = async (orgId: string) => {
|
||||||
queryClient.removeQueries({ queryKey: authKeys.getAuthToken });
|
|
||||||
queryClient.removeQueries({ queryKey: projectKeys.getAllUserProjects() });
|
|
||||||
|
|
||||||
const { token, isMfaEnabled, mfaMethod } = await selectOrganization({
|
const { token, isMfaEnabled, mfaMethod } = await selectOrganization({
|
||||||
organizationId: orgId
|
organizationId: orgId
|
||||||
});
|
});
|
||||||
@@ -202,6 +199,8 @@ export const Navbar = () => {
|
|||||||
await router.invalidate();
|
await router.invalidate();
|
||||||
await navigateUserToOrg(navigate, orgId);
|
await navigateUserToOrg(navigate, orgId);
|
||||||
queryClient.removeQueries({ queryKey: subOrgQuery.queryKey });
|
queryClient.removeQueries({ queryKey: subOrgQuery.queryKey });
|
||||||
|
queryClient.removeQueries({ queryKey: authKeys.getAuthToken });
|
||||||
|
queryClient.removeQueries({ queryKey: projectKeys.getAllUserProjects() });
|
||||||
};
|
};
|
||||||
|
|
||||||
const { mutateAsync } = useGetOrgTrialUrl();
|
const { mutateAsync } = useGetOrgTrialUrl();
|
||||||
|
|||||||
Reference in New Issue
Block a user