fix(GenericNode/index.tsx): fix indentation and formatting issues in the code for better readability
feat(GenericNode/index.tsx): add condition to only render ParameterComponent if base_classes array is not empty
This commit is contained in:
parent
fb3e4b88c5
commit
339cde462f
1 changed files with 26 additions and 24 deletions
|
|
@ -491,30 +491,32 @@ export default function GenericNode({
|
||||||
>
|
>
|
||||||
{" "}
|
{" "}
|
||||||
</div>
|
</div>
|
||||||
<ParameterComponent
|
{data.node!.base_classes.length > 0 && (
|
||||||
key={scapedJSONStringfy({
|
<ParameterComponent
|
||||||
baseClasses: data.node!.base_classes,
|
key={scapedJSONStringfy({
|
||||||
id: data.id,
|
baseClasses: data.node!.base_classes,
|
||||||
dataType: data.type,
|
id: data.id,
|
||||||
})}
|
dataType: data.type,
|
||||||
data={data}
|
})}
|
||||||
setData={setData}
|
data={data}
|
||||||
color={nodeColors[types[data.type]] ?? nodeColors.unknown}
|
setData={setData}
|
||||||
title={
|
color={nodeColors[types[data.type]] ?? nodeColors.unknown}
|
||||||
data.node?.output_types && data.node.output_types.length > 0
|
title={
|
||||||
? data.node.output_types.join("|")
|
data.node?.output_types && data.node.output_types.length > 0
|
||||||
: data.type
|
? data.node.output_types.join("|")
|
||||||
}
|
: data.type
|
||||||
tooltipTitle={data.node?.base_classes.join("\n")}
|
}
|
||||||
id={{
|
tooltipTitle={data.node?.base_classes.join("\n")}
|
||||||
baseClasses: data.node!.base_classes,
|
id={{
|
||||||
id: data.id,
|
baseClasses: data.node!.base_classes,
|
||||||
dataType: data.type,
|
id: data.id,
|
||||||
}}
|
dataType: data.type,
|
||||||
type={data.node?.base_classes.join("|")}
|
}}
|
||||||
left={false}
|
type={data.node?.base_classes.join("|")}
|
||||||
showNode={showNode}
|
left={false}
|
||||||
/>
|
showNode={showNode}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue