Skip to content

Commit 3f50c0f

Browse files
committed
feat: update prop to open modal
1 parent f0e7123 commit 3f50c0f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Shared/Components/CICDHistory/AppStatusDetailsChart.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { Button, ButtonStyleType, ButtonVariantType } from '../Button'
2828
const AppStatusDetailsChart = ({
2929
filterRemoveHealth = false,
3030
showFooter,
31-
setShowConfigDriftModal,
31+
handleOpenConfigDriftModal,
3232
onClose,
3333
}: AppStatusDetailsChartType) => {
3434
const _appDetails = IndexStore.getAppDetails()
@@ -39,7 +39,7 @@ const AppStatusDetailsChart = ({
3939

4040
const handleCompareDesiredManifest = () => {
4141
onClose()
42-
setShowConfigDriftModal(true)
42+
handleOpenConfigDriftModal()
4343
}
4444

4545
const nodes: AggregatedNodes = useMemo(
@@ -148,7 +148,7 @@ const AppStatusDetailsChart = ({
148148
{nodeDetails.status ? nodeDetails.status : nodeDetails.health.status}
149149
</div>
150150
<div className="flexbox-col dc__gap-4">
151-
{setShowConfigDriftModal && nodeDetails.hasDrift && (
151+
{handleOpenConfigDriftModal && nodeDetails.hasDrift && (
152152
<div className="flexbox dc__gap-8 dc__align-items-center">
153153
<span className="fs-13 fw-4 lh-20 cy-7">Config drift detected</span>
154154
{onClose && appId && envId && (

src/Shared/Components/CICDHistory/types.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { CSSProperties, Dispatch, ReactElement, SetStateAction } from 'react'
17+
import { CSSProperties, ReactElement } from 'react'
1818
import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/types'
1919
import {
2020
OptionType,
@@ -560,7 +560,7 @@ export interface DeploymentHistorySidebarType {
560560
export interface AppStatusDetailsChartType {
561561
filterRemoveHealth?: boolean
562562
showFooter: boolean
563-
setShowConfigDriftModal?: Dispatch<SetStateAction<boolean>>
563+
handleOpenConfigDriftModal?: () => void
564564
onClose?: () => void
565565
}
566566

0 commit comments

Comments
 (0)