From f091851451edbe566fe4bc2b952fac90821fdd89 Mon Sep 17 00:00:00 2001 From: Joakim Uddholm Date: Mon, 14 Oct 2024 10:50:42 +0200 Subject: [PATCH] chore: lint-fix --- api/src/resources/gram/v1/flows/delete.ts | 2 +- app/src/components/model/panels/left/DataFlowTab.js | 4 +--- app/src/reducers/model.js | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/src/resources/gram/v1/flows/delete.ts b/api/src/resources/gram/v1/flows/delete.ts index a4d18cdc..08ce315e 100644 --- a/api/src/resources/gram/v1/flows/delete.ts +++ b/api/src/resources/gram/v1/flows/delete.ts @@ -12,7 +12,7 @@ export function deleteFlow(dal: DataAccessLayer) { } const id = parseInt(flowId); - const flow = await dal.flowService.getById(id); + const flow = await dal.flowService.getById(id); if (!flow) { res.status(404).json({ message: "Flow not found" }); diff --git a/app/src/components/model/panels/left/DataFlowTab.js b/app/src/components/model/panels/left/DataFlowTab.js index 39b8d555..aa6c3fd7 100644 --- a/app/src/components/model/panels/left/DataFlowTab.js +++ b/app/src/components/model/panels/left/DataFlowTab.js @@ -79,9 +79,7 @@ export function DataFlowTab() { label="Label" value={label} disabled={readOnly} - onBlur={() => - patchDataFlow({ label }) - } + onBlur={() => patchDataFlow({ label })} onChange={(e) => setLabel(e.target.value)} onKeyDown={shouldBlur} /> diff --git a/app/src/reducers/model.js b/app/src/reducers/model.js index 92db3e8c..7ca37bd6 100644 --- a/app/src/reducers/model.js +++ b/app/src/reducers/model.js @@ -135,7 +135,10 @@ const mutatorReducer = (state = initialState, action) => { editedDataflow.labelAnchor = 2; } // If there is an anchor and the label was just removed, remove the anchor. - else if (editedDataflow.label === "" && editedDataflow.labelAnchor !== -1) { + else if ( + editedDataflow.label === "" && + editedDataflow.labelAnchor !== -1 + ) { // Delete anchor by removing points. editedDataflow.points = [ ...editedDataflow.points.slice(0, editedDataflow.labelAnchor),