Skip to content

Commit 3a01f13

Browse files
authored
Merge branch 'main' into mg/OPS-3029-2
2 parents 953e4f0 + fbe5a81 commit 3a01f13

1 file changed

Lines changed: 3 additions & 17 deletions

File tree

  • packages/react-ui/src/app/routes/openops-tables

packages/react-ui/src/app/routes/openops-tables/index.tsx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,16 @@ import { t } from 'i18next';
22
import { useLocation } from 'react-router-dom';
33

44
import { flagsHooks } from '@/app/common/hooks/flags-hooks';
5-
import { platformHooks } from '@/app/common/hooks/platform-hooks';
6-
import { projectHooks } from '@/app/common/hooks/project-hooks';
75
import { useDefaultSidebarState } from '@/app/common/hooks/use-default-sidebar-state';
86
import { useCandu } from '@/app/features/extensions/candu/use-candu';
97
import { FlagId } from '@openops/shared';
108

119
const OpenOpsTablesPage = () => {
1210
useDefaultSidebarState('minimized');
1311
const { isCanduEnabled, canduClientToken, canduUserId } = useCandu();
14-
const { project } = projectHooks.useCurrentProject();
15-
const { platform: organization } = platformHooks.useCurrentPlatform();
16-
17-
// TODO: Remove type assertion and remove organization?.tablesWorkspaceId fallback once Phase 1 is complete
18-
const workspaceId =
19-
(project as any)?.tablesWorkspaceId ?? organization?.tablesWorkspaceId;
20-
21-
const parentDataObj = {
22-
userId: canduUserId ?? undefined,
23-
canduClientToken: canduClientToken ?? undefined,
24-
...(isCanduEnabled && { isCanduEnabled: true }),
25-
...(workspaceId !== undefined && { workspaceId }),
26-
};
27-
28-
const parentData = encodeURIComponent(JSON.stringify(parentDataObj));
12+
const parentData = encodeURIComponent(
13+
JSON.stringify({ isCanduEnabled, userId: canduUserId, canduClientToken }),
14+
);
2915

3016
const location = useLocation();
3117
const params = new URLSearchParams(location.search);

0 commit comments

Comments
 (0)