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
@@ -20,11 +20,11 @@ import {
Tooltip
} from "@app/components/v2";
import { ROUTE_PATHS } from "@app/const/routes";
import { OrgPermissionActions, OrgPermissionSubjects, useWorkspace } from "@app/context";
import { OrgPermissionActions, OrgPermissionSubjects, useProject } from "@app/context";
import { usePopUp, useToggle } from "@app/hooks";
import { useGetIntegration } from "@app/hooks/api";
import { useDeleteIntegration, useSyncIntegration } from "@app/hooks/api/integrations/queries";
import { ProjectType } from "@app/hooks/api/workspace/types";
import { ProjectType } from "@app/hooks/api/projects/types";
import { IntegrationAuditLogsSection } from "./components/IntegrationAuditLogsSection";
import { IntegrationConnectionSection } from "./components/IntegrationConnectionSection";
@@ -45,8 +45,8 @@ export const IntegrationDetailsByIDPage = () => {
const [shouldDeleteSecrets, setShouldDeleteSecrets] = useToggle(false);
const { currentWorkspace } = useWorkspace();
const projectId = currentWorkspace.id;
const { currentProject } = useProject();
const projectId = currentProject.id;
const { mutateAsync: syncIntegration } = useSyncIntegration();
const { mutateAsync: deleteIntegration } = useDeleteIntegration();
@@ -56,7 +56,7 @@ export const IntegrationDetailsByIDPage = () => {
try {
await deleteIntegration({
id: integrationId,
workspaceId: currentWorkspace.id,
workspaceId: currentProject.id,
shouldDeleteIntegrationSecrets
});
@@ -1,7 +1,7 @@
import { Link } from "@tanstack/react-router";
import { EmptyState } from "@app/components/v2";
import { useSubscription, useWorkspace } from "@app/context";
import { useSubscription, useProject } from "@app/context";
import { EventType } from "@app/hooks/api/auditLogs/enums";
import { TIntegrationWithEnv } from "@app/hooks/api/integrations/types";
import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection";
@@ -15,7 +15,7 @@ type Props = {
export const IntegrationAuditLogsSection = ({ integration }: Props) => {
const { subscription } = useSubscription();
const { currentWorkspace } = useWorkspace();
const { currentProject } = useProject();
const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30;
@@ -31,7 +31,7 @@ export const IntegrationAuditLogsSection = ({ integration }: Props) => {
<LogsSection
refetchInterval={4000}
showFilters={false}
project={currentWorkspace}
project={currentProject}
presets={{
eventMetadata: { integrationId: integration.id },
startDate: new Date(