diff --git a/frontend/src/layouts/ProjectGeneralLayout/ProjectGeneralLayout.tsx b/frontend/src/layouts/ProjectGeneralLayout/ProjectGeneralLayout.tsx index c1f8701d1..fe9e88f74 100644 --- a/frontend/src/layouts/ProjectGeneralLayout/ProjectGeneralLayout.tsx +++ b/frontend/src/layouts/ProjectGeneralLayout/ProjectGeneralLayout.tsx @@ -1,137 +1,54 @@ -import { useTranslation } from "react-i18next"; -import { faMobile } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Link, Outlet } from "@tanstack/react-router"; import { motion } from "framer-motion"; -import { Badge, Menu, MenuItem } from "@app/components/v2"; +import { Menu, MenuItem } from "@app/components/v2"; import { useWorkspace } from "@app/context"; -import { - useGetAccessRequestsCount, - 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 ProjectGeneralLayout = () => { const { currentWorkspace } = useWorkspace(); - const { t } = useTranslation(); - const workspaceId = currentWorkspace?.id || ""; - const projectSlug = currentWorkspace?.slug || ""; - - const { data: secretApprovalReqCount } = useGetSecretApprovalRequestCount({ - workspaceId - }); - const { data: accessApprovalRequestCount } = useGetAccessRequestsCount({ - projectSlug - }); - - // we only show the secret rotations v1 tab if they have existing rotations - const { data: secretRotations } = useGetSecretRotations({ - workspaceId, - options: { - refetchOnMount: false - } - }); - - const pendingRequestsCount = - (secretApprovalReqCount?.open || 0) + (accessApprovalRequestCount?.pendingCount || 0); - return ( - <> -
- {` ${t("common.no-mobile")} `} -