Skip to content

Commit 1720c8a

Browse files
authored
fix: Hide Lock/Unlock button on unsupported devices (#594)
1 parent 9810755 commit 1720c8a

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/lib/seam/components/DeviceDetails/LockDeviceDetails.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,17 @@ export function LockDeviceDetails(
127127
<span className='seam-value'>{lockStatus}</span>
128128
</div>
129129
<div className='seam-right'>
130-
{disableLockUnlock !== true && (
131-
<Button
132-
size='small'
133-
onClick={() => {
134-
toggleLock.mutate()
135-
}}
136-
>
137-
{toggleLockLabel}
138-
</Button>
139-
)}
130+
{disableLockUnlock !== true &&
131+
device.capabilities_supported.includes('lock') && (
132+
<Button
133+
size='small'
134+
onClick={() => {
135+
toggleLock.mutate()
136+
}}
137+
>
138+
{toggleLockLabel}
139+
</Button>
140+
)}
140141
</div>
141142
</div>
142143
<AccessCodeLength

0 commit comments

Comments
 (0)