Add the route to update a relay
This commit is contained in:
@ -35,6 +35,11 @@ export function DeviceRelays(p: {
|
||||
setCurrRelay(undefined);
|
||||
};
|
||||
|
||||
const updateRelay = async (r: DeviceRelay) => {
|
||||
setDialogOpen(true);
|
||||
setCurrRelay(r);
|
||||
};
|
||||
|
||||
const deleteRelay = async (r: DeviceRelay) => {
|
||||
if (
|
||||
!(await confirm("Do you really want to delete this relay configuration?"))
|
||||
@ -95,7 +100,7 @@ export function DeviceRelays(p: {
|
||||
secondaryAction={
|
||||
<>
|
||||
<Tooltip title="Edit the relay configuration">
|
||||
<IconButton>
|
||||
<IconButton onClick={() => updateRelay(r)}>
|
||||
<EditIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
Reference in New Issue
Block a user