mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-11 06:29:04 +00:00
fix: fix isAcessible query join/filter and clear sub org query cache when org changes
This commit is contained in:
@@ -134,13 +134,13 @@ export const Navbar = () => {
|
||||
const { subscription } = useSubscription();
|
||||
const { currentOrg, isSubOrganization } = useOrganization();
|
||||
|
||||
console.log("current", currentOrg, isSubOrganization);
|
||||
|
||||
const [showAdminsModal, setShowAdminsModal] = useState(false);
|
||||
const [showSubOrgForm, setShowSubOrgForm] = useState(false);
|
||||
const [showCardDeclinedModal, setShowCardDeclinedModal] = useState(false);
|
||||
|
||||
const subOrgQuery = subOrganizationsQuery.list({ limit: 500, isAccessible: true });
|
||||
const { data: subOrganizations = [] } = useQuery({
|
||||
...subOrganizationsQuery.list({ limit: 500, isAccessible: true }),
|
||||
...subOrgQuery,
|
||||
enabled: Boolean(subscription.subOrganization)
|
||||
});
|
||||
|
||||
@@ -183,6 +183,7 @@ export const Navbar = () => {
|
||||
}
|
||||
await router.invalidate();
|
||||
await navigateUserToOrg(navigate, orgId);
|
||||
queryClient.removeQueries({ queryKey: subOrgQuery.queryKey });
|
||||
};
|
||||
|
||||
const { mutateAsync } = useGetOrgTrialUrl();
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { z } from "zod";
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { Button, FormControl, Input } from "@app/components/v2";
|
||||
import { useCreateSubOrganization } from "@app/hooks/api";
|
||||
import { GenericResourceNameSchema, slugSchema } from "@app/lib/schemas";
|
||||
import { slugSchema } from "@app/lib/schemas";
|
||||
|
||||
type ContentProps = {
|
||||
onClose: () => void;
|
||||
|
||||
Reference in New Issue
Block a user