Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions GUI/src/hooks/flow/useEdgeAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@

const newNodeId = generateUniqueId();

const defaultMcqButtons = [
{ id: '1', title: 'Jah', payload: '' },
{ id: '2', title: 'Ei', payload: '' },
];

const multiChoiceQuestion =
stepType === StepType.MultiChoiceQuestion ? { question: '', buttons: defaultMcqButtons } : undefined;

const insertNode = {
id: newNodeId,
position: { x: targetNode.position.x, y: targetNode.position.y },
Expand All @@ -39,7 +31,6 @@
stepType: stepType,
readonly: [StepType.Auth, StepType.FinishingStepEnd, StepType.FinishingStepRedirect].includes(stepType),
endpoint: step.data,
multiChoiceQuestion,
setClickedNode: useServiceStore.getState().setClickedNode,
},
className: (() => {
Expand Down Expand Up @@ -110,7 +101,7 @@
});

if (targetEdge) {
targetEdge.label = labels[labels.length - 1] ?? '+';

Check warning on line 104 in GUI/src/hooks/flow/useEdgeAdd.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `.at(…)` over `[….length - index]`.

See more on https://sonarcloud.io/project/issues?id=buerokratt_Service-Module&issues=AZ5OqJ6RFcSfan2evEhA&open=AZ5OqJ6RFcSfan2evEhA&pullRequest=1025
}
}

Expand Down
Loading