@@ -2,8 +2,8 @@ import React from 'react';
22
33import { ArrowRight , ChevronDown , ChevronUp , Database } from '@gravity-ui/icons' ;
44import { Button , ClipboardButton , Flex , Icon , Text } from '@gravity-ui/uikit' ;
5+ import { useHistory } from 'react-router-dom' ;
56
6- import { InternalLink } from '../../../components/InternalLink' ;
77import { VersionsBar } from '../../../components/VersionsBar/VersionsBar' ;
88import { cn } from '../../../utils/cn' ;
99import type { PreparedNodeSystemState } from '../../../utils/nodes' ;
@@ -37,6 +37,8 @@ export const NodesTreeTitle = ({
3737 preparedVersions,
3838 onClick,
3939} : NodesTreeTitleProps ) => {
40+ const history = useHistory ( ) ;
41+
4042 const handleClick = React . useCallback < React . MouseEventHandler < HTMLDivElement > > (
4143 ( event ) => {
4244 const shouldSkip = event . nativeEvent . composedPath ( ) . some ( isActiveButtonTarget ) ;
@@ -64,18 +66,15 @@ export const NodesTreeTitle = ({
6466 const renderNodesCount = ( ) => {
6567 if ( isDatabase ) {
6668 return (
67- < InternalLink
68- to = { getTenantPath ( {
69- database : title ,
70- diagnosticsTab : 'nodes' ,
71- } ) }
72- tabIndex = { 0 }
69+ < Button
70+ size = "s"
71+ onClick = { ( ) =>
72+ history . push ( getTenantPath ( { database : title , diagnosticsTab : 'nodes' } ) )
73+ }
7374 >
74- < Button size = "s" >
75- { i18n ( 'nodes-count' , { count : nodesAmount } ) }
76- < Icon data = { ArrowRight } />
77- </ Button >
78- </ InternalLink >
75+ { i18n ( 'nodes-count' , { count : nodesAmount } ) }
76+ < Icon data = { ArrowRight } />
77+ </ Button >
7978 ) ;
8079 }
8180
0 commit comments