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.
This commit is contained in:
anovazzi1 2023-09-18 19:48:14 -03:00
commit 59cd201ad9

View file

@ -125,7 +125,7 @@ export default function GenericNode({
/>
</div> : <ShadTooltip content={data.node?.display_name}>
<div className="generic-node-tooltip-div text-primary" onDoubleClick={() => setInputName(true)}>
{nodeName}
{data.node?.display_name}
</div>
</ShadTooltip>
}
@ -219,7 +219,7 @@ export default function GenericNode({
}
}}
/> :
<div className="generic-node-desc-text" onDoubleClick={() => setInputDescription(true)}>{nodeDescription}</div>
<div className="generic-node-desc-text" onDoubleClick={() => setInputDescription(true)}>{data.node?.description}</div>
}
<>