chore: apply suggestions from threads for merge.

This commit is contained in:
Björn Otgaar
2025-11-20 14:53:42 +01:00
parent 1dfc14ede8
commit 79b645df88
8 changed files with 29 additions and 40 deletions

View File

@@ -17,7 +17,13 @@ export type StartNodeData = {
export type StartNode = Node<StartNodeData>
export default function StartNode(props: NodeProps<Node>) {
/**
* Defines how a Norm node should be rendered
* @param props NodeProps, like id, label, children
* @returns React.JSX.Element
*/
export default function StartNode(props: NodeProps<StartNode>) {
return (
<>
<Toolbar nodeId={props.id} allowDelete={false}/>
@@ -31,6 +37,12 @@ export default function StartNode(props: NodeProps<Node>) {
);
}
/**
* The reduce function for this node type.
* @param node this node
* @param nodes all the nodes in the graph
* @returns a reduced structure of this node
*/
export function StartReduce(node: Node, nodes: Node[]) {
// Replace this for nodes functionality
if (nodes.length <= -1) {