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:
parent
15a2c95351
commit
59cd201ad9
1 changed files with 2 additions and 2 deletions
|
|
@ -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>
|
||||
}
|
||||
|
||||
<>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue