File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
pages/project/vpcs/VpcPage/tabs Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export function VpcSubnetsTab() {
8484 colHelper . accessor ( 'customRouterId' , {
8585 header : 'Custom Router' ,
8686 // RouterLinkCell needed, as we need to convert the customRouterId to the custom router's name
87- cell : ( info ) => < RouterLinkCell value = { info . getValue ( ) } /> ,
87+ cell : ( info ) => < RouterLinkCell routerId = { info . getValue ( ) } /> ,
8888 } ) ,
8989 colHelper . accessor ( 'timeCreated' , Columns . timeCreated ) ,
9090 getActionsCol ( makeActions ) ,
Original file line number Diff line number Diff line change @@ -14,17 +14,14 @@ import { pb } from '~/util/path-builder'
1414import { EmptyCell , SkeletonCell } from './EmptyCell'
1515import { LinkCell } from './LinkCell'
1616
17- export const RouterLinkCell = ( { value } : { value ?: string } ) => {
17+ export const RouterLinkCell = ( { routerId } : { routerId ?: string } ) => {
1818 const { project, vpc } = useVpcSelector ( )
1919 const { data : router , isError } = useApiQuery (
2020 'vpcRouterView' ,
21- {
22- path : { router : value ! } ,
23- query : { project, vpc } ,
24- } ,
25- { enabled : ! ! value }
21+ { path : { router : routerId ! } } , // it's an ID, so no parent selector
22+ { enabled : ! ! routerId }
2623 )
27- if ( ! value ) return < EmptyCell />
24+ if ( ! routerId ) return < EmptyCell />
2825 // probably not possible but let’s be safe
2926 if ( isError ) return < Badge color = "neutral" > Deleted</ Badge >
3027 if ( ! router ) return < SkeletonCell /> // loading
You can’t perform that action at this time.
0 commit comments