feat: union said - bring back overview page!!

This commit is contained in:
=
2025-09-01 14:43:24 +05:30
parent 19a5f52d20
commit b650b142f7
4 changed files with 1690 additions and 71 deletions

View File

@@ -72,15 +72,14 @@ export const getProjectBaseURL = (type: ProjectType) => {
}
};
// @ts-expect-error akhilmhdh: will remove this later
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const getProjectHomePage = (type: ProjectType, environments: WorkspaceEnv[]) => {
switch (type) {
case ProjectType.SecretManager:
if (environments.length > 0)
return `/projects/secret-management/$projectId/secrets/${environments[0].slug}`;
return "/projects/secret-management/$projectId/overview";
return "/projects/secret-management/$projectId/overview" as const;
case ProjectType.CertificateManager:
return "/projects/cert-management/$projectId/subscribers";
return "/projects/cert-management/$projectId/subscribers" as const;
case ProjectType.SecretScanning:
return `/projects/${type}/$projectId/data-sources` as const;
default:

View File

@@ -72,11 +72,7 @@ export const SecretManagerLayout = () => {
<Menu>
<MenuGroup title="Resources">
<Link
to={
currentWorkspace.environments.length
? "/projects/secret-management/$projectId/secrets/$envSlug"
: "/projects/secret-management/$projectId/overview"
}
to="/projects/secret-management/$projectId/overview"
params={{
projectId: currentWorkspace.id,
...(currentWorkspace.environments.length
@@ -89,7 +85,7 @@ export const SecretManagerLayout = () => {
isSelected={
isActive ||
location.pathname.startsWith(
`/projects/secret-management/${currentWorkspace.id}/secrets`
`/projects/secret-management/${currentWorkspace.id}/overview`
)
}
>

View File

@@ -2,20 +2,20 @@ import { Controller, useForm } from "react-hook-form";
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { zodResolver } from "@hookform/resolvers/zod";
import { useQuery } from "@tanstack/react-query";
import { twMerge } from "tailwind-merge";
import { z } from "zod";
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
import { Button, FormControl, Input, Select, SelectItem, Tooltip } from "@app/components/v2";
import { NoticeBannerV2 } from "@app/components/v2/NoticeBannerV2/NoticeBannerV2";
import { useImportVault } from "@app/hooks/api/migration/mutations";
import { OrgPermissionCan } from "@app/components/permissions";
import {
OrgGatewayPermissionActions,
OrgPermissionSubjects
} from "@app/context/OrgPermissionContext/types";
import { useQuery } from "@tanstack/react-query";
import { gatewaysQueryKeys } from "@app/hooks/api";
import { useImportVault } from "@app/hooks/api/migration/mutations";
type Props = {
id?: string;

File diff suppressed because it is too large Load Diff