Skip to content

Commit

Permalink
fixed disabled edit button redirecting when it should not (when insta…
Browse files Browse the repository at this point in the history
…lled) (#1527)

* fixed disabled link redirecting when it should not

* refactoring
  • Loading branch information
plehocky authored Mar 25, 2024
1 parent 8e98ad2 commit 66d643a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ const DeviceTable: VoidFunctionComponent<Props> = ({
isDisabled={isInstalled}
disabled={isInstalled}
icon={<Icon size={12} as={FeatherIcon} icon="edit" />}
as={Link}
to={`../${device.id}/edit`}
as={isInstalled ? 'button' : Link}
{...(isInstalled ? {} : { to: `../${device.id}/edit` })}
/>
<IconButton
data-cy={`device-delete-${device.name}`}
Expand Down

0 comments on commit 66d643a

Please sign in to comment.