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 machineStatusPreflight = actionToDo => {
|
||||
|
|
@ -193,8 +192,8 @@ const MachineActions = memo(({ machine, onActionSuccess }) => {
|
|||
</div>
|
||||
<ConfirmDialog
|
||||
disabled={disabled}
|
||||
open={confirmDialogOpen}
|
||||
title={`${action?.display} this machine?`}
|
||||
open={action.command}
|
||||
title={`${action.display} this machine?`}
|
||||
errorMessage={errorMessage}
|
||||
toBeConfirmed={machine.name}
|
||||
message={action?.message}
|
||||
|
|
@ -211,7 +210,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => {
|
|||
})
|
||||
}}
|
||||
onDismissed={() => {
|
||||
setAction({ command: null })
|
||||
setAction({ display: action.display, command: null })
|
||||
setErrorMessage(null)
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue