chore: apply suggestions from threads for merge.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user