From 3cb6070aca62697c00febd7c2d06ea980e61d9c9 Mon Sep 17 00:00:00 2001 From: Ari Date: Tue, 5 Jul 2022 23:02:17 -0400 Subject: [PATCH] clean up --- webapp/src/components/AutomationList/index.tsx | 1 + .../ConditionEditor/ConditionNodeBase.tsx | 8 -------- .../ConditionEditor/ConditionNodeSettings.tsx | 1 - webapp/src/components/DAGFlow/index.tsx | 13 ++----------- webapp/src/components/Page/index.tsx | 1 + webapp/src/components/SpeedDial/index.tsx | 2 +- 6 files changed, 5 insertions(+), 21 deletions(-) diff --git a/webapp/src/components/AutomationList/index.tsx b/webapp/src/components/AutomationList/index.tsx index 14cd05a..2190076 100644 --- a/webapp/src/components/AutomationList/index.tsx +++ b/webapp/src/components/AutomationList/index.tsx @@ -75,6 +75,7 @@ export const AutomationList: FC = ({ snackbr.enqueueSnackbar("Saved.", { variant: "info" }); } firstRender.current = true; + // eslint-disable-next-line }, [automations]); // render return ( diff --git a/webapp/src/components/ConditionEditor/ConditionNodeBase.tsx b/webapp/src/components/ConditionEditor/ConditionNodeBase.tsx index ed6114b..4307f9c 100644 --- a/webapp/src/components/ConditionEditor/ConditionNodeBase.tsx +++ b/webapp/src/components/ConditionEditor/ConditionNodeBase.tsx @@ -6,15 +6,7 @@ import { FC, useState } from "react"; import { AutomationCondition } from "types/automations/conditions"; import { getSubTypeList } from "utils/automations"; import { getConditionDefaultValues } from "utils/defaults"; -import CodeOutlinedIcon from "@mui/icons-material/CodeOutlined"; -import CodeOffOutlinedIcon from "@mui/icons-material/CodeOffOutlined"; -import EditOutlinedIcon from "@mui/icons-material/EditOutlined"; -import SaveIcon from "@mui/icons-material/Save"; -import EditOffIcon from "@mui/icons-material/EditOff"; -import DeleteForeverIcon from "@mui/icons-material/DeleteForever"; -import SettingsApplicationsIcon from "@mui/icons-material/SettingsApplications"; import { useHA } from "haService"; -import { ButtonIcon } from "components/Icons/ButtonIcons"; import InputYaml from "components/Inputs/InputYaml"; import { getViewer } from "./viewRender"; import { getEditor } from "./editorRender"; diff --git a/webapp/src/components/ConditionEditor/ConditionNodeSettings.tsx b/webapp/src/components/ConditionEditor/ConditionNodeSettings.tsx index b627784..1da0494 100644 --- a/webapp/src/components/ConditionEditor/ConditionNodeSettings.tsx +++ b/webapp/src/components/ConditionEditor/ConditionNodeSettings.tsx @@ -8,7 +8,6 @@ import SaveIcon from "@mui/icons-material/Save"; import EditOffIcon from "@mui/icons-material/EditOff"; import DeleteForeverIcon from "@mui/icons-material/DeleteForever"; import SettingsApplicationsIcon from "@mui/icons-material/SettingsApplications"; -import useWindowSize from "utils/useWindowSize"; import { FC } from "react"; import { SpeedDial } from "components/SpeedDial"; diff --git a/webapp/src/components/DAGFlow/index.tsx b/webapp/src/components/DAGFlow/index.tsx index e4131aa..40b893b 100644 --- a/webapp/src/components/DAGFlow/index.tsx +++ b/webapp/src/components/DAGFlow/index.tsx @@ -1,23 +1,14 @@ import { FC, useState } from "react"; import ReactFlow, { Controls } from "react-flow-renderer"; -import { AutomationSequenceNode } from "types/automations"; -import { AutomationTrigger } from "types/automations/triggers"; import { triggerToFlow } from "./triggerConvertor"; import { DAGNode, makeConditionPoint } from "./DAGNode"; -import { - DAGAutomationFlowDims, - FlowData, - ModalState, - UpdateModalState, -} from "./types"; +import { DAGAutomationFlowDims, FlowData, ModalState } from "./types"; import { DAGCircle } from "./DAGCircle"; import { sequenceToFlow } from "./sequenceConvertor"; -import { makeSequenceUpdater } from "./updater"; import { NodeEditor } from "components/NodeEditor"; import { Modal } from "components/Modal"; -import { AutomationCondition } from "types/automations/conditions"; -import { convertToFlowNode, makeOnEditAutomationConditions } from "./helpers"; +import { convertToFlowNode } from "./helpers"; import { DAGErrorNode } from "./DAGErrorNode"; import { useHA } from "haService"; import { getDescriptionFromAutomationNode } from "utils/formatting"; diff --git a/webapp/src/components/Page/index.tsx b/webapp/src/components/Page/index.tsx index b4f1928..b2618b7 100644 --- a/webapp/src/components/Page/index.tsx +++ b/webapp/src/components/Page/index.tsx @@ -129,6 +129,7 @@ export const convertPaletteToCss = (p: Palette): string => { "common", ]) { const pc = p[k as keyof Palette] as PaletteColor | Color; + // eslint-disable-next-line Object.entries(pc).forEach(([n, v]) => { out += `\n --mui-${k}-${n}: ${v};`; }); diff --git a/webapp/src/components/SpeedDial/index.tsx b/webapp/src/components/SpeedDial/index.tsx index b527b34..2ce332a 100644 --- a/webapp/src/components/SpeedDial/index.tsx +++ b/webapp/src/components/SpeedDial/index.tsx @@ -1,5 +1,5 @@ import "./index.css"; -import { FC, ReactNode, useRef, useState } from "react"; +import { FC, ReactNode, useState } from "react"; import ClickAwayListener from "@mui/material/ClickAwayListener"; export type SpeedDialProps = {