@@ -6,13 +6,19 @@ import { COLORS } from '../../../styles/theme/colors'
66import { Table , TableCellAlign , TableColProps } from '../../components/Table'
77import { TablePaginationProps } from '../../components/Table/TablePagination'
88import { RoflAppInstanceStatusBadge } from 'app/components/Rofl/RoflAppInstanceStatusBadge'
9+ import { RouteUtils } from 'app/utils/route-utils'
10+ import { Link as RouterLink } from 'react-router-dom'
11+ import Link from '@mui/material/Link'
12+ import { SearchScope } from '../../../types/searchScope'
913
1014type InstancesListProps = {
1115 currentEpoch : number | undefined
1216 instances : RoflInstance [ ] | undefined
1317 isLoading : boolean
1418 limit : number
1519 pagination : false | TablePaginationProps
20+ appId : string
21+ scope : SearchScope
1622}
1723
1824export const InstancesList : FC < InstancesListProps > = ( {
@@ -21,6 +27,8 @@ export const InstancesList: FC<InstancesListProps> = ({
2127 pagination,
2228 instances,
2329 currentEpoch,
30+ appId,
31+ scope,
2432} ) => {
2533 const { t } = useTranslation ( )
2634 const tableColumns : TableColProps [ ] = [
@@ -34,14 +42,21 @@ export const InstancesList: FC<InstancesListProps> = ({
3442 currentEpoch !== undefined && instances
3543 ? instances ?. map ( instance => {
3644 const isActive = instance . expiration_epoch > currentEpoch
45+ const to = RouteUtils . getRoflAppInstanceRoute ( scope . network , appId , instance . rak )
3746
3847 return {
3948 key : instance . rak ,
4049 backgroundColor : isActive ? 'transparent' : COLORS . grayLight ,
4150 data : [
4251 {
4352 key : 'rak' ,
44- content : < Typography variant = "mono" > { instance . rak } </ Typography > ,
53+ content : (
54+ < Typography variant = "mono" >
55+ < Link component = { RouterLink } to = { to } >
56+ { instance . rak }
57+ </ Link >
58+ </ Typography >
59+ ) ,
4560 } ,
4661 {
4762 key : 'node' ,
0 commit comments