@@ -7,11 +7,11 @@ import {PageError, isAccessError} from '../../components/Errors/PageError/PageEr
77import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper' ;
88import SplitPane from '../../components/SplitPane' ;
99import { setHeaderBreadcrumbs } from '../../store/reducers/header/header' ;
10- import { useGetSchemaQuery } from '../../store/reducers/schema/schema ' ;
10+ import { overviewApi } from '../../store/reducers/overview/overview ' ;
1111import type { AdditionalNodesProps , AdditionalTenantsProps } from '../../types/additionalProps' ;
1212import { cn } from '../../utils/cn' ;
1313import { DEFAULT_IS_TENANT_SUMMARY_COLLAPSED , DEFAULT_SIZE_TENANT_KEY } from '../../utils/constants' ;
14- import { useTypedDispatch } from '../../utils/hooks' ;
14+ import { useAutoRefreshInterval , useTypedDispatch } from '../../utils/hooks' ;
1515
1616import ObjectGeneral from './ObjectGeneral/ObjectGeneral' ;
1717import { ObjectSummary } from './ObjectSummary/ObjectSummary' ;
@@ -41,6 +41,7 @@ interface TenantProps {
4141}
4242
4343export function Tenant ( props : TenantProps ) {
44+ const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
4445 const [ summaryVisibilityState , dispatchSummaryVisibilityAction ] = React . useReducer (
4546 paneVisibilityToggleReducerCreator ( DEFAULT_IS_TENANT_SUMMARY_COLLAPSED ) ,
4647 undefined ,
@@ -74,7 +75,13 @@ export function Tenant(props: TenantProps) {
7475
7576 const path = schema ?? tenantName ;
7677
77- const { data : currentItem , error, isLoading} = useGetSchemaQuery ( { path, database : tenantName } ) ;
78+ const { currentData, error, isLoading} = overviewApi . useGetOverviewQuery (
79+ { paths : [ path ] , database : tenantName } ,
80+ {
81+ pollingInterval : autoRefreshInterval ,
82+ } ,
83+ ) ;
84+ const { data : currentItem } = currentData ?? { } ;
7885 const { PathType : currentPathType , PathSubType : currentPathSubType } =
7986 currentItem ?. PathDescription ?. Self || { } ;
8087
0 commit comments