From a5aec246864422aa8048af29e3f17952deb43adc Mon Sep 17 00:00:00 2001 From: Ari Date: Sat, 24 Sep 2022 15:15:54 -0400 Subject: [PATCH] fix --- .../src/components/DAGGraph/NodesRow/index.tsx | 18 ------------------ webapp/src/components/DAGGraph/board/index.tsx | 5 ++--- .../components/DAGGraph/elements/helpers.tsx | 2 +- webapp/src/components/DAGGraph/index.tsx | 2 +- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/webapp/src/components/DAGGraph/NodesRow/index.tsx b/webapp/src/components/DAGGraph/NodesRow/index.tsx index 16ee470..819992a 100644 --- a/webapp/src/components/DAGGraph/NodesRow/index.tsx +++ b/webapp/src/components/DAGGraph/NodesRow/index.tsx @@ -1,22 +1,5 @@ import "./index.css"; -//*
-// {data.map((node, i) => { -// return ( -// -// ); -// })} -//
*/ - import { AutomationNode, AutomationNodeMapping } from "types/automations"; import { useHA } from "services/ha"; import { CollectionNodeElement } from "components/DAGGraph/nodes/CollectionNode/CollectionNodeElement"; @@ -26,7 +9,6 @@ import { makeCollectionNodeMakerChildProps } from "components/DAGGraph/elements/ import { AutomationCondition } from "types/automations/conditions"; import { AutomationTrigger } from "types/automations/triggers"; import { FC } from "react"; -import { SequenceNodeElement } from "components/DAGGraph/nodes/SequenceNode/SequenceNodeElement"; export type NodesRowProps< K extends keyof AutomationNodeMapping, diff --git a/webapp/src/components/DAGGraph/board/index.tsx b/webapp/src/components/DAGGraph/board/index.tsx index 83c2e28..9f35527 100644 --- a/webapp/src/components/DAGGraph/board/index.tsx +++ b/webapp/src/components/DAGGraph/board/index.tsx @@ -1,8 +1,8 @@ import "./index.css"; -import { FC, useEffect } from "react"; +import { FC } from "react"; import CircularProgress from "@mui/material/CircularProgress"; -import ReactFlow, { Controls, useReactFlow } from "react-flow-renderer"; +import ReactFlow, { Controls } from "react-flow-renderer"; import { NodeEditor } from "components/NodeEditor"; import { Modal } from "components/Modal"; @@ -16,7 +16,6 @@ export const DAGGraphBoard: FC = ({ closeModal, additionalControls, }) => { - const reactFlow = useReactFlow(); // render unready or errored states if (!state.ready) { return ( diff --git a/webapp/src/components/DAGGraph/elements/helpers.tsx b/webapp/src/components/DAGGraph/elements/helpers.tsx index d62c5fa..2609f24 100644 --- a/webapp/src/components/DAGGraph/elements/helpers.tsx +++ b/webapp/src/components/DAGGraph/elements/helpers.tsx @@ -7,7 +7,7 @@ import { validateNode } from "utils/automations"; import { AutomationCondition } from "types/automations/conditions"; import { AutomationTrigger } from "types/automations/triggers"; -import { DAGDims, ElementMaker, ElementMakerProps, Size } from "./types"; +import { DAGDims, ElementMaker, ElementMakerProps } from "./types"; import { DAGElementsOutputState } from "./outputState"; import { convertFailuresToSequenceNodeDataProps } from "./util"; diff --git a/webapp/src/components/DAGGraph/index.tsx b/webapp/src/components/DAGGraph/index.tsx index 533c8b2..6c4d5d4 100644 --- a/webapp/src/components/DAGGraph/index.tsx +++ b/webapp/src/components/DAGGraph/index.tsx @@ -8,7 +8,7 @@ import { DEFAULT_DIMS } from "./elements/constants"; import { DAGGraphBoard } from "./board"; import { AutomationTrigger } from "types/automations/triggers"; import { AutomationCondition } from "types/automations/conditions"; -import { NodesRow, TriggerConditionNodeRow } from "./NodesRow"; +import { TriggerConditionNodeRow } from "./NodesRow"; export const DAGAutomationGraph: FC<{ action: AutomationSequenceNode[];