mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: orgid in routing
This commit is contained in:
@@ -70,7 +70,8 @@ export default function NavHeader({
|
||||
{currentOrg?.name?.charAt(0)}
|
||||
</div>
|
||||
<Link
|
||||
to="/organization/projects"
|
||||
to="/organizations/$orgId/projects"
|
||||
params={{ orgId: currentOrg?.id || "" }}
|
||||
className="truncate pl-0.5 text-sm font-medium text-primary/80 hover:text-primary"
|
||||
>
|
||||
{currentOrg?.name}
|
||||
@@ -90,8 +91,8 @@ export default function NavHeader({
|
||||
<FontAwesomeIcon icon={faAngleRight} className="mr-3 ml-3 text-sm text-gray-400" />
|
||||
{pageName === "Secrets" ? (
|
||||
<Link
|
||||
to="/projects/secret-management/$projectId/overview"
|
||||
params={{ projectId: currentProject.id }}
|
||||
to="/organizations/$orgId/projects/secret-management/$projectId/overview"
|
||||
params={{ orgId: currentOrg?.id || "", projectId: currentProject.id }}
|
||||
className="text-sm font-medium text-primary/80 hover:text-primary"
|
||||
>
|
||||
{pageName}
|
||||
@@ -126,8 +127,8 @@ export default function NavHeader({
|
||||
<div className="flex items-center space-x-3">
|
||||
<FontAwesomeIcon icon={faAngleRight} className="mr-1.5 ml-3 text-xs text-gray-400" />
|
||||
<Link
|
||||
to="/projects/secret-management/$projectId/secrets/$envSlug"
|
||||
params={{ projectId: currentProject.id, envSlug: routerEnvSlug }}
|
||||
to="/organizations/$orgId/projects/secret-management/$projectId/secrets/$envSlug"
|
||||
params={{ orgId: currentOrg.id, projectId: currentProject.id, envSlug: routerEnvSlug }}
|
||||
className="text-sm font-medium text-primary/80 hover:text-primary"
|
||||
>
|
||||
{userAvailableEnvs?.find(({ slug }) => slug === currentEnv)?.name}
|
||||
@@ -188,8 +189,9 @@ export default function NavHeader({
|
||||
</div>
|
||||
) : (
|
||||
<Link
|
||||
to="/projects/secret-management/$projectId/secrets/$envSlug"
|
||||
to="/organizations/$orgId/projects/secret-management/$projectId/secrets/$envSlug"
|
||||
params={{
|
||||
orgId: currentOrg?.id || "",
|
||||
projectId: currentProject.id,
|
||||
envSlug: routerEnvSlug || ""
|
||||
}}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { Link } from "@tanstack/react-router";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
import { useOrganization } from "@app/context";
|
||||
import { useTimedReset } from "@app/hooks";
|
||||
|
||||
import { createNotification } from "../notifications";
|
||||
@@ -23,6 +24,7 @@ export const SecretDashboardPathBreadcrumb = ({
|
||||
projectId,
|
||||
disableCopy
|
||||
}: Props) => {
|
||||
const { currentOrg } = useOrganization();
|
||||
const [, isCopying, setIsCopying] = useTimedReset({
|
||||
initialState: false
|
||||
});
|
||||
@@ -69,8 +71,9 @@ export const SecretDashboardPathBreadcrumb = ({
|
||||
</div>
|
||||
) : (
|
||||
<Link
|
||||
to="/projects/secret-management/$projectId/secrets/$envSlug"
|
||||
to="/organizations/$orgId/projects/secret-management/$projectId/secrets/$envSlug"
|
||||
params={{
|
||||
orgId: currentOrg?.id || "",
|
||||
projectId,
|
||||
envSlug: environmentSlug
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user