@@ -4,7 +4,7 @@ import {Flex, Tabs} from '@gravity-ui/uikit';
44import { skipToken } from '@reduxjs/toolkit/query' ;
55import { Helmet } from 'react-helmet-async' ;
66import { useParams } from 'react-router-dom' ;
7- import { StringParam , useQueryParams } from 'use-query-params' ;
7+ import { useQueryParams } from 'use-query-params' ;
88import { z } from 'zod' ;
99
1010import { EmptyStateWrapper } from '../../components/EmptyState' ;
@@ -13,7 +13,7 @@ import {ResponseError} from '../../components/Errors/ResponseError';
1313import { InternalLink } from '../../components/InternalLink' ;
1414import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper' ;
1515import { PageMetaWithAutorefresh } from '../../components/PageMeta/PageMeta' ;
16- import { getTabletPagePath } from '../../routes' ;
16+ import { getTabletPagePath , tabletPageQueryParams } from '../../routes' ;
1717import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentication/authentication' ;
1818import { setHeaderBreadcrumbs } from '../../store/reducers/header/header' ;
1919import { tabletApi } from '../../store/reducers/tablet' ;
@@ -58,19 +58,13 @@ const TABLET_PAGE_TABS = [
5858
5959const tabletTabSchema = z . nativeEnum ( TABLET_TABS_IDS ) . catch ( TABLET_TABS_IDS . history ) ;
6060
61- const tabletQueryParams = {
62- tenantName : StringParam ,
63- clusterName : StringParam ,
64- activeTab : StringParam ,
65- } ;
66-
6761export function Tablet ( ) {
6862 const dispatch = useTypedDispatch ( ) ;
6963
7064 const { id} = useParams < { id : string } > ( ) ;
7165
72- const [ { tenantName : queryDatabase , clusterName : queryClusterName } ] =
73- useQueryParams ( tabletQueryParams ) ;
66+ const [ { database : queryDatabase , clusterName : queryClusterName } ] =
67+ useQueryParams ( tabletPageQueryParams ) ;
7468
7569 const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
7670 const { currentData, isFetching, error} = tabletApi . useGetTabletQuery (
@@ -168,7 +162,7 @@ function TabletTabs({
168162 hiveId ?: string ;
169163 history : ITabletPreparedHistoryItem [ ] ;
170164} ) {
171- const [ { activeTab, ...restParams } , setParams ] = useQueryParams ( tabletQueryParams ) ;
165+ const [ { activeTab, ...restParams } , setParams ] = useQueryParams ( tabletPageQueryParams ) ;
172166 const isUserAllowedToMakeChanges = useTypedSelector ( selectIsUserAllowedToMakeChanges ) ;
173167
174168 const noAdvancedInfo = ! isUserAllowedToMakeChanges || ! hasHive ( hiveId ) ;
0 commit comments