From 59cd201ad9ea0979a058eb947dff35ea425ff940 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 18 Sep 2023 19:48:14 -0300 Subject: [PATCH] refactor(GenericNode/index.tsx): use data from API response to display node name and description instead of local variables The changes were made to improve consistency and ensure that the displayed node name and description are always in sync with the data received from the API response. By using the `data.node?.display_name` and `data.node?.description` properties, we can dynamically update the node name and description without relying on local variables. This also allows for easier maintenance and reduces the risk of displaying outdated or incorrect information. --- src/frontend/src/CustomNodes/GenericNode/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 3efefd9ac..27c5d3db4 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -125,7 +125,7 @@ export default function GenericNode({ /> :
setInputName(true)}> - {nodeName} + {data.node?.display_name}
} @@ -219,7 +219,7 @@ export default function GenericNode({ } }} /> : -
setInputDescription(true)}>{nodeDescription}
+
setInputDescription(true)}>{data.node?.description}
} <>