feat: seperated layouts for each product line

This commit is contained in:
=
2025-07-02 01:16:48 +05:30
parent c66510f473
commit d82d22a198
18 changed files with 597 additions and 240 deletions
@@ -11,10 +11,7 @@ import {
useGetSecretApprovalRequestCount,
useGetSecretRotations
} from "@app/hooks/api";
import { ProjectType } from "@app/hooks/api/workspace/types";
// This is a generic layout shared by all types of projects.
// If the product layout differs significantly, create a new layout as needed.
export const SecretManagerLayout = () => {
const { currentWorkspace } = useWorkspace();
@@ -59,7 +56,7 @@ export const SecretManagerLayout = () => {
<div className="mt-2 flex-grow">
<Menu>
<Link
to={`/projects/$projectId/${ProjectType.SecretManager}/overview` as const}
to="/projects/$projectId/secret-manager/overview"
params={{
projectId: currentWorkspace.id
}}
@@ -69,7 +66,7 @@ export const SecretManagerLayout = () => {
)}
</Link>
<Link
to={`/projects/$projectId/${ProjectType.SecretManager}/integrations` as const}
to="/projects/$projectId/secret-manager/integrations"
params={{
projectId: currentWorkspace.id
}}
@@ -80,7 +77,7 @@ export const SecretManagerLayout = () => {
</Link>
{Boolean(secretRotations?.length) && (
<Link
to={`/${ProjectType.SecretManager}/$projectId/secret-rotation` as const}
to="/projects/$projectId/secret-manager/secret-rotation"
params={{
projectId: currentWorkspace.id
}}
@@ -89,7 +86,7 @@ export const SecretManagerLayout = () => {
</Link>
)}
<Link
to={`/projects/$projectId/${ProjectType.SecretManager}/approval` as const}
to="/projects/$projectId/secret-manager/approval"
params={{
projectId: currentWorkspace.id
}}