refactor(panel): simplify outputSchema mapping for improved readability

This commit is contained in:
twwu
2025-09-03 23:06:12 +08:00
parent e3092837e4
commit c7510d3f54

View File

@ -134,11 +134,10 @@ const Panel: FC<NodePanelProps<DataSourceNodeType>> = ({ id, data }) => {
/> />
)) ))
} }
{ {outputSchema.map((outputItem) => {
outputSchema.map((outputItem) => { const schemaType = getMatchedSchemaType(outputItem.value, schemaTypeDefinitions)
const schemaType = getMatchedSchemaType(outputItem.value, schemaTypeDefinitions)
return ( return (
<div key={outputItem.name}> <div key={outputItem.name}>
{outputItem.value?.type === 'object' ? ( {outputItem.value?.type === 'object' ? (
<StructureOutputItem <StructureOutputItem