File tree 1 file changed +8
-3
lines changed
src/components/BasicNodeViewer
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import {Icon} from '@gravity-ui/uikit';
6
6
import type { PreparedNode } from '../../store/reducers/node/types' ;
7
7
import type { AdditionalNodesProps } from '../../types/additionalProps' ;
8
8
import { cn } from '../../utils/cn' ;
9
+ import { createDeveloperUILinkWithNodeId } from '../../utils/developerUI/developerUI' ;
9
10
import { EntityStatus } from '../EntityStatus/EntityStatus' ;
10
11
import { Tags } from '../Tags' ;
11
12
@@ -20,9 +21,13 @@ interface BasicNodeViewerProps {
20
21
}
21
22
22
23
export const BasicNodeViewer = ( { node, additionalNodesProps, className} : BasicNodeViewerProps ) => {
23
- const nodeHref = additionalNodesProps ?. getNodeRef
24
- ? additionalNodesProps . getNodeRef ( node ) + 'internal'
25
- : undefined ;
24
+ let nodeHref : string | undefined ;
25
+
26
+ if ( additionalNodesProps ?. getNodeRef ) {
27
+ nodeHref = additionalNodesProps . getNodeRef ( node ) + 'internal' ;
28
+ } else if ( node . NodeId ) {
29
+ nodeHref = createDeveloperUILinkWithNodeId ( node . NodeId ) + 'internal' ;
30
+ }
26
31
27
32
return (
28
33
< div className = { b ( null , className ) } >
You can’t perform that action at this time.
0 commit comments