@@ -2,30 +2,16 @@ import { t } from 'i18next';
22import { useLocation } from 'react-router-dom' ;
33
44import { 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' ;
75import { useDefaultSidebarState } from '@/app/common/hooks/use-default-sidebar-state' ;
86import { useCandu } from '@/app/features/extensions/candu/use-candu' ;
97import { FlagId } from '@openops/shared' ;
108
119const 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