Skip to content

Commit 728e896

Browse files
fix: do not wrap button with a link
1 parent 189aa30 commit 728e896

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/containers/Versions/NodesTreeTitle/NodesTreeTitle.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React from 'react';
22

33
import {ArrowRight, ChevronDown, ChevronUp, Database} from '@gravity-ui/icons';
44
import {Button, ClipboardButton, Flex, Icon, Text} from '@gravity-ui/uikit';
5+
import {useHistory} from 'react-router-dom';
56

6-
import {InternalLink} from '../../../components/InternalLink';
77
import {VersionsBar} from '../../../components/VersionsBar/VersionsBar';
88
import {cn} from '../../../utils/cn';
99
import 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

Comments
 (0)