diff --git a/frontend-v2/src/components/organization/CreateOrgModal/CreateOrgModal.tsx b/frontend-v2/src/components/organization/CreateOrgModal/CreateOrgModal.tsx index 5341b7da5..b5712e596 100644 --- a/frontend-v2/src/components/organization/CreateOrgModal/CreateOrgModal.tsx +++ b/frontend-v2/src/components/organization/CreateOrgModal/CreateOrgModal.tsx @@ -58,7 +58,7 @@ export const CreateOrgModal: FC = ({ isOpen, onClose }) => }); navigate({ - to: `/organization/$organizationId/${ProjectType.SecretManager}/overview` as const, + to: `/organization/${ProjectType.SecretManager}/overview` as const, params: { organizationId: organization.id } diff --git a/frontend-v2/src/components/projects/NewProjectModal.tsx b/frontend-v2/src/components/projects/NewProjectModal.tsx index 6906291bf..5ef17ec84 100644 --- a/frontend-v2/src/components/projects/NewProjectModal.tsx +++ b/frontend-v2/src/components/projects/NewProjectModal.tsx @@ -148,8 +148,7 @@ const NewProjectForm = ({ onOpenChange, projectType }: NewProjectFormProps) => { createNotification({ text: "Project created", type: "success" }); reset(); onOpenChange(false); - // TODO(rbr): make this return constant so this gets typed - navigate({ to: getProjectHomePage(project) }); + navigate({ to: getProjectHomePage(project), params: { projectId: project.id } }); } catch (err) { console.error(err); createNotification({ text: "Failed to create project", type: "error" }); diff --git a/frontend-v2/src/hooks/api/workspace/queries.tsx b/frontend-v2/src/hooks/api/workspace/queries.tsx index 9fc2f9b71..be6821f99 100644 --- a/frontend-v2/src/hooks/api/workspace/queries.tsx +++ b/frontend-v2/src/hooks/api/workspace/queries.tsx @@ -150,7 +150,6 @@ export const useGetUserWorkspaces = ({ } = {}) => useQuery({ queryKey: workspaceKeys.getAllUserWorkspace(type || ""), - queryFn: () => fetchUserWorkspaces(includeRoles, type) }); diff --git a/frontend-v2/src/layouts/OrganizationLayout/OrganizationLayout.tsx b/frontend-v2/src/layouts/OrganizationLayout/OrganizationLayout.tsx index ace362ba9..36f7d6177 100644 --- a/frontend-v2/src/layouts/OrganizationLayout/OrganizationLayout.tsx +++ b/frontend-v2/src/layouts/OrganizationLayout/OrganizationLayout.tsx @@ -8,7 +8,7 @@ import { Mfa } from "@app/components/auth/Mfa"; import { CreateOrgModal } from "@app/components/organization/CreateOrgModal"; import SecurityClient from "@app/components/utilities/SecurityClient"; import { Menu, MenuItem } from "@app/components/v2"; -import { useOrganization, useUser } from "@app/context"; +import { useUser } from "@app/context"; import { usePopUp, useToggle } from "@app/hooks"; import { useSelectOrganization } from "@app/hooks/api"; import { MfaMethod } from "@app/hooks/api/auth/types"; @@ -19,8 +19,6 @@ import { SidebarFooter } from "./components/SidebarFooter"; import { SidebarHeader } from "./components/SidebarHeader"; export const OrganizationLayout = () => { - const { currentOrg } = useOrganization(); - const [shouldShowMfa, toggleShowMfa] = useToggle(false); const [requiredMfaMethod, setRequiredMfaMethod] = useState(MfaMethod.EMAIL); const [mfaSuccessCallback, setMfaSuccessCallback] = useState<() => void>(() => {}); @@ -73,70 +71,42 @@ export const OrganizationLayout = () => {
- + {({ isActive }) => ( Secret Management )} - + {({ isActive }) => ( Cert Management )} - + {({ isActive }) => ( Key Management )} - + {({ isActive }) => ( Access Control )} - + {({ isActive }) => ( Secret Scanning )} - + {({ isActive }) => ( Secret Sharing @@ -146,11 +116,7 @@ export const OrganizationLayout = () => { {(window.location.origin.includes("https://app.infisical.com") || window.location.origin.includes("https://eu.infisical.com") || window.location.origin.includes("https://gamma.infisical.com")) && ( - + {({ isActive }) => ( { )} )} - + {({ isActive }) => ( Audit Logs )} - + {({ isActive }) => ( { {(window.location.origin.includes("https://app.infisical.com") || window.location.origin.includes("https://gamma.infisical.com")) && } { - const { organizationId } = useRouteContext({ - from: "/_authenticate/personal-settings/_personal-settings-layout" - }); const { t } = useTranslation(); const infisicalPlatformVersion = import.meta.env.VITE_INFISICAL_PLATFORM_VERSION; @@ -31,12 +28,7 @@ export const PersonalSettingsLayout = () => {