Skip to content

Commit

Permalink
fix(123): change the disabled state for the restart command
Browse files Browse the repository at this point in the history
  • Loading branch information
vanch3d committed Sep 28, 2023
1 parent 6ca80fa commit 96faa9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const ConnectionButton: FC<ConnectionElementProps> = ({ id, isRunning, onChangeS
/>
)}
<IconButton
isDisabled={isLoading}
isDisabled={isLoading || !isRunning}
data-testid={'device-action-restart'}
aria-label={t('action.restart')}
icon={<MdRestartAlt />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ConnectionMenu: FC<ConnectionElementProps> = ({ id, isRunning, isLoading,
)}

<MenuItem
isDisabled={isLoading}
isDisabled={isLoading || !isRunning}
data-testid={'device-action-restart'}
onClick={() => onChangeStatus?.(id, StatusTransitionCommand.command.RESTART)}
>
Expand Down

0 comments on commit 96faa9a

Please sign in to comment.