import React from "react"; import { ContentRenderer } from "./ui/render"; import { beautifyString } from "@/lib/utils"; import * as Separator from "@radix-ui/react-separator"; type NodeOutputsProps = { title?: string; truncateLongData?: boolean; data: { [key: string]: Array }; }; export default function NodeOutputs({ title, truncateLongData, data, }: NodeOutputsProps) { return (
{title && {title}} {Object.entries(data).map(([pin, dataArray]) => (
Pin: {beautifyString(pin)}
Data:
{dataArray.slice(0, 10).map((item, index) => ( {index < Math.min(dataArray.length, 10) - 1 && ", "} ))} {dataArray.length > 10 && (

and {dataArray.length - 10} more
)}
))}
); }