From 338c1f85c94044119c989f564cb4b52db1dfd99e Mon Sep 17 00:00:00 2001 From: Nikola Ubavic <53820106+ubavic@users.noreply.github.com> Date: Tue, 7 Dec 2021 18:08:34 +0100 Subject: [PATCH] fix: ConfirmDialog title shows undefined on exit chore: remove variable --- .../src/components/machineActions/MachineActions.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/new-lamassu-admin/src/components/machineActions/MachineActions.js b/new-lamassu-admin/src/components/machineActions/MachineActions.js index d2f58eea..60d20174 100644 --- a/new-lamassu-admin/src/components/machineActions/MachineActions.js +++ b/new-lamassu-admin/src/components/machineActions/MachineActions.js @@ -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 }) => { { }) }} onDismissed={() => { - setAction({ command: null }) + setAction({ display: action.display, command: null }) setErrorMessage(null) }} />