|
@@ -155,14 +155,8 @@ const ManageCommandsProcessWithoutProxy = ({ apiv3Put, commandPermission }) => {
|
|
|
if (commandPermission == null) {
|
|
if (commandPermission == null) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- setEditingCommandPermission(() => {
|
|
|
|
|
- return Object.entries(commandPermission).reduce((acc, entry) => {
|
|
|
|
|
- const [command, value] = entry;
|
|
|
|
|
- acc[command] = value;
|
|
|
|
|
- return acc;
|
|
|
|
|
- }, {});
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ const updatedState = { ...commandPermission };
|
|
|
|
|
+ setEditingCommandPermission(updatedState);
|
|
|
}, [commandPermission]);
|
|
}, [commandPermission]);
|
|
|
|
|
|
|
|
const updateChannelsListState = useCallback((e) => {
|
|
const updateChannelsListState = useCallback((e) => {
|