fix: ConfirmDialog title shows undefined on exit
chore: remove variable
This commit is contained in:
parent
d292ea4ae3
commit
338c1f85c9
1 changed files with 3 additions and 4 deletions
|
|
@ -97,7 +97,6 @@ const MachineActions = memo(({ machine, onActionSuccess }) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const confirmDialogOpen = Boolean(action.command)
|
|
||||||
const disabled = !!(action?.command === 'restartServices' && loadingEvents)
|
const disabled = !!(action?.command === 'restartServices' && loadingEvents)
|
||||||
|
|
||||||
const machineStatusPreflight = actionToDo => {
|
const machineStatusPreflight = actionToDo => {
|
||||||
|
|
@ -193,8 +192,8 @@ const MachineActions = memo(({ machine, onActionSuccess }) => {
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
open={confirmDialogOpen}
|
open={action.command}
|
||||||
title={`${action?.display} this machine?`}
|
title={`${action.display} this machine?`}
|
||||||
errorMessage={errorMessage}
|
errorMessage={errorMessage}
|
||||||
toBeConfirmed={machine.name}
|
toBeConfirmed={machine.name}
|
||||||
message={action?.message}
|
message={action?.message}
|
||||||
|
|
@ -211,7 +210,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => {
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
onDismissed={() => {
|
onDismissed={() => {
|
||||||
setAction({ command: null })
|
setAction({ display: action.display, command: null })
|
||||||
setErrorMessage(null)
|
setErrorMessage(null)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue