Skip to content

Commit

Permalink
add cluster link
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed May 28, 2024
1 parent bf69377 commit fbed46f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions assets/src/components/stacks/StackOverview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Card, Prop, useSetBreadcrumbs } from '@pluralsh/design-system'
import React, { useMemo } from 'react'
import { useOutletContext } from 'react-router-dom'
import { Link, useNavigate, useOutletContext } from 'react-router-dom'
import { useTheme } from 'styled-components'

import capitalize from 'lodash/capitalize'
Expand All @@ -9,12 +9,21 @@ import moment from 'moment/moment'

import { ClusterProviderIcon } from '../utils/Provider'

import {
CD_ABS_PATH,

Check failure on line 13 in assets/src/components/stacks/StackOverview.tsx

View workflow job for this annotation

GitHub Actions / Lint

'CD_ABS_PATH' is defined but never used. Allowed unused vars must match /^_/u
CLUSTERS_REL_PATH,

Check failure on line 14 in assets/src/components/stacks/StackOverview.tsx

View workflow job for this annotation

GitHub Actions / Lint

'CLUSTERS_REL_PATH' is defined but never used. Allowed unused vars must match /^_/u
getClusterDetailsPath,
} from '../../routes/cdRoutesConsts'

import { InlineLink } from '../utils/typography/InlineLink'

import { StackOutletContextT, getBreadcrumbs } from './Stacks'
import StackStatusChip from './common/StackStatusChip'
import StackApprovalChip from './common/StackApprovalChip'

export default function StackOverview() {
const theme = useTheme()
const navigate = useNavigate()

Check failure on line 26 in assets/src/components/stacks/StackOverview.tsx

View workflow job for this annotation

GitHub Actions / Lint

'navigate' is assigned a value but never used. Allowed unused vars must match /^_/u
const { stack } = useOutletContext() as StackOutletContextT

useSetBreadcrumbs(
Expand Down Expand Up @@ -89,7 +98,12 @@ export default function StackOverview() {
cluster={stack.cluster}
size={16}
/>
{stack.cluster?.name}
<InlineLink
as={Link}
to={getClusterDetailsPath({ clusterId: stack?.cluster?.id })}
>
{stack.cluster?.name}
</InlineLink>
</div>
</Prop>

Expand Down

0 comments on commit fbed46f

Please sign in to comment.