File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
src/Shared/Components/AppStatusModal Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ const AppStatusModal = ({
127
127
>
128
128
< div className = "flexbox-col px-20 border__primary--bottom dc__no-shrink" >
129
129
< div className = "flexbox py-12 dc__content-space" >
130
- < div className = "fs-16 fw-6 lh-1-5" > { title } </ div >
130
+ { title }
131
131
132
132
< Button
133
133
dataTestId = "close-modal-header-icon-button"
Original file line number Diff line number Diff line change 1
1
export { default as AppStatusContent } from './AppStatusContent'
2
2
export { default as AppStatusModal } from './AppStatusModal.component'
3
+ export { getAppStatusModalTitle } from './utils'
Original file line number Diff line number Diff line change
1
+ import { Fragment } from 'react'
2
+
1
3
import { DEPLOYMENT_STATUS } from '@Shared/constants'
2
4
import { aggregateNodes } from '@Shared/Helpers'
3
5
import { AppDetails , Node } from '@Shared/types'
@@ -64,3 +66,18 @@ export const getFlattenedNodesFromAppDetails = ({
64
66
}
65
67
66
68
export const getResourceKey = ( nodeDetails : Node ) => `${ nodeDetails . kind } /${ nodeDetails . name } `
69
+
70
+ export const getAppStatusModalTitle = ( segments : string [ ] ) => {
71
+ const filteredSegments = ( segments || [ ] ) . filter ( ( segment ) => ! ! segment )
72
+
73
+ return (
74
+ < h2 className = "m-0 dc__truncate fs-16 fw-6 lh-1-5" >
75
+ { filteredSegments ?. map ( ( segment , index ) => (
76
+ < Fragment key = { segment } >
77
+ { segment }
78
+ { index !== segments . length - 1 && < span className = "cn-6 fs-16 fw-4" > /</ span > }
79
+ </ Fragment >
80
+ ) ) }
81
+ </ h2 >
82
+ )
83
+ }
You can’t perform that action at this time.
0 commit comments