Skip to content

Commit

Permalink
fix(ui): wrong insight page title (#399)
Browse files Browse the repository at this point in the history
## What type of PR is this?

/kind refactor

## What this PR does / why we need it:

Fix wrong insight page title

Co-authored-by: hai-tian <[email protected]>
  • Loading branch information
elliotxx and hai-tian authored Apr 26, 2024
1 parent 5250eeb commit 4c421cf
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/src/pages/insightDetail/cluster/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ const ClusterDetail = () => {
),
}
}
if (from === 'insight') {
first = {
title: <NavLink to={`/insight`}>{t('Insight')}</NavLink>,
}
}
const result = [
first,
{
Expand Down
5 changes: 5 additions & 0 deletions ui/src/pages/insightDetail/kind/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ const ClusterDetail = () => {
),
}
}
if (from === 'insight') {
first = {
title: <NavLink to={`/insight`}>{t('Insight')}</NavLink>,
}
}
const middle = []
;['cluster', 'kind']?.forEach(item => {
const urlParamsItem = urlParams?.[item]
Expand Down
5 changes: 5 additions & 0 deletions ui/src/pages/insightDetail/namespace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ const ClusterDetail = () => {
),
}
}
if (from === 'insight') {
first = {
title: <NavLink to={`/insight`}>{t('Insight')}</NavLink>,
}
}
const middle = []
;['cluster', 'namespace']?.forEach(item => {
if (urlParams?.[item]) {
Expand Down
5 changes: 5 additions & 0 deletions ui/src/pages/insightDetail/resource/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ const ClusterDetail = () => {
),
}
}
if (from === 'insight') {
first = {
title: <NavLink to={'/insight'}>{t('Insight')}</NavLink>,
}
}
const middle = []
;['cluster', 'kind', 'namespace', 'name']?.forEach(item => {
const urlParamsItem = urlParams?.[item]
Expand Down

0 comments on commit 4c421cf

Please sign in to comment.