feat: removed last bit of workspace in frontend. Fatality!

This commit is contained in:
=
2025-09-16 00:08:41 +05:30
parent 37a80fa1ac
commit ac80242749
356 changed files with 1788 additions and 1890 deletions
@@ -15,7 +15,7 @@ import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
import { Badge, Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
import { useProjectPermission, useWorkspace } from "@app/context";
import { useProjectPermission, useProject } from "@app/context";
import {
useGetAccessRequestsCount,
useGetSecretApprovalRequestCount,
@@ -25,16 +25,15 @@ import {
import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePrivilegeModeBanner";
export const SecretManagerLayout = () => {
const { currentWorkspace } = useWorkspace();
const { currentProject, projectId } = useProject();
const { assumedPrivilegeDetails } = useProjectPermission();
const { t } = useTranslation();
const workspaceId = currentWorkspace?.id || "";
const projectSlug = currentWorkspace?.slug || "";
const projectSlug = currentProject?.slug || "";
const location = useLocation();
const { data: secretApprovalReqCount } = useGetSecretApprovalRequestCount({
workspaceId
projectId
});
const { data: accessApprovalRequestCount } = useGetAccessRequestsCount({
projectSlug
@@ -42,7 +41,7 @@ export const SecretManagerLayout = () => {
// we only show the secret rotations v1 tab if they have existing rotations
const { data: secretRotations } = useGetSecretRotations({
workspaceId,
workspaceId: projectId,
options: {
refetchOnMount: false
}
@@ -74,9 +73,9 @@ export const SecretManagerLayout = () => {
<Link
to="/projects/secret-management/$projectId/overview"
params={{
projectId: currentWorkspace.id,
...(currentWorkspace.environments.length
? { envSlug: currentWorkspace.environments[0]?.slug }
projectId: currentProject.id,
...(currentProject.environments.length
? { envSlug: currentProject.environments[0]?.slug }
: {})
}}
>
@@ -85,7 +84,7 @@ export const SecretManagerLayout = () => {
isSelected={
isActive ||
location.pathname.startsWith(
`/projects/secret-management/${currentWorkspace.id}/overview`
`/projects/secret-management/${currentProject.id}/overview`
)
}
>
@@ -101,7 +100,7 @@ export const SecretManagerLayout = () => {
<Link
to="/projects/secret-management/$projectId/integrations"
params={{
projectId: currentWorkspace.id
projectId: currentProject.id
}}
>
{({ isActive }) => (
@@ -119,7 +118,7 @@ export const SecretManagerLayout = () => {
<Link
to="/projects/secret-management/$projectId/secret-rotation"
params={{
projectId: currentWorkspace.id
projectId: currentProject.id
}}
>
{({ isActive }) => (
@@ -137,7 +136,7 @@ export const SecretManagerLayout = () => {
<Link
to="/projects/secret-management/$projectId/approval"
params={{
projectId: currentWorkspace.id
projectId: currentProject.id
}}
>
{({ isActive }) => (
@@ -164,7 +163,7 @@ export const SecretManagerLayout = () => {
<Link
to="/projects/secret-management/$projectId/access-management"
params={{
projectId: currentWorkspace.id
projectId: currentProject.id
}}
>
{({ isActive }) => (
@@ -181,7 +180,7 @@ export const SecretManagerLayout = () => {
<Link
to="/projects/secret-management/$projectId/audit-logs"
params={{
projectId: currentWorkspace.id
projectId: currentProject.id
}}
>
{({ isActive }) => (
@@ -198,7 +197,7 @@ export const SecretManagerLayout = () => {
<Link
to="/projects/secret-management/$projectId/settings"
params={{
projectId: currentWorkspace.id
projectId: currentProject.id
}}
>
{({ isActive }) => (