Skip to content

Commit 6ea9924

Browse files
committed
refactor - DeploymentHistoryConfigDiff - code refactor
1 parent c7356ce commit 6ea9924

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {
2626
diffStateTextMap,
2727
} from '@Shared/Components/DeploymentConfigDiff'
2828

29-
import { DeploymentStatus } from '@Shared/Components/StatusComponent'
3029
import { History } from '../types'
3130
import { DeploymentHistoryConfigDiffProps } from './types'
3231

@@ -77,8 +76,6 @@ export const renderDeploymentHistoryConfig = (
7776
</div>
7877
)
7978

80-
export const renderPipelineDeploymentStatusIcon = (status: string) => <DeploymentStatus status={status} />
81-
8279
export const renderPipelineDeploymentOptionDescription = ({
8380
stage,
8481
triggeredBy,

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.ts renamed to src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ import moment from 'moment'
1919
import { DATE_TIME_FORMATS, ERROR_STATUS_CODE } from '@Common/Constants'
2020
import { DeploymentStageType } from '@Shared/constants'
2121
import { SelectPickerOptionType } from '@Shared/Components/SelectPicker'
22+
import { DeploymentStatus } from '@Shared/Components/StatusComponent'
2223

2324
import { History } from '../types'
24-
import { renderPipelineDeploymentOptionDescription, renderPipelineDeploymentStatusIcon } from './helpers'
25+
import { renderPipelineDeploymentOptionDescription } from './helpers'
2526
import { DeploymentHistoryConfigDiffProps } from './types'
2627

2728
export const getPipelineDeployments = (triggerHistory: DeploymentHistoryConfigDiffProps['triggerHistory']) =>
@@ -68,7 +69,7 @@ export const getPipelineDeploymentsOptions = ({
6869
resourceId,
6970
runSource: triggerHistory.get(id).runSource,
7071
}),
71-
startIcon: renderPipelineDeploymentStatusIcon(status),
72+
startIcon: <DeploymentStatus status={status} />,
7273
}),
7374
)
7475
const currentDeployment = moment(pipelineDeployments[currentDeploymentIndex].startedOn).format(

0 commit comments

Comments
 (0)