updates DeviceConnection component

This commit is contained in:
Mose Müller 2024-01-16 15:58:46 +01:00
parent 7ef82e61e5
commit f1384b25a1

View File

@ -9,7 +9,7 @@ import { MethodComponent } from './MethodComponent';
type DeviceConnectionProps = {
name: string;
props: DataServiceJSON;
parentPath?: string;
parentPath: string;
isInstantUpdate: boolean;
addNotification: (message: string, levelname?: LevelName) => void;
};
@ -18,14 +18,13 @@ export const DeviceConnectionComponent = React.memo(
({
name,
props,
parentPath = '',
parentPath,
isInstantUpdate,
addNotification
}: DeviceConnectionProps) => {
const { available, connect, ...updatedProps } = props;
const availableVal = available.value;
console.log(connect);
let fullAccessPath = parentPath;
if (name) {
fullAccessPath = [parentPath, name].filter((element) => element).join('.');