From 66cec7d5453377c9dd3b455f0253d70f5ecb3b69 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Sun, 23 Jul 2023 19:49:13 -0300 Subject: [PATCH] Formatting on merge --- .../EditFlowSettingsComponent/index.tsx | 4 +-- .../components/inputListComponent/index.tsx | 6 ++-- .../src/modals/EditNodeModal/index.tsx | 3 +- .../src/modals/genericModal/index.tsx | 6 ++-- .../components/nodeToolbarComponent/index.tsx | 31 +++++++++---------- 5 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx index 06c2af949..28b82d78e 100644 --- a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx @@ -40,10 +40,10 @@ export const EditFlowSettings: React.FC = ({ const [desc, setDesc] = useState( flows.find((f) => f.id === tabId).description ); - + const handleDescriptionChange = (event: ChangeEvent) => { flows.find((f) => f.id === tabId).description = event.target.value; - setDesc(flows.find((f) => f.id === tabId).description) + setDesc(flows.find((f) => f.id === tabId).description); setDescription(event.target.value); }; diff --git a/src/frontend/src/components/inputListComponent/index.tsx b/src/frontend/src/components/inputListComponent/index.tsx index 78912d466..0a5205f11 100644 --- a/src/frontend/src/components/inputListComponent/index.tsx +++ b/src/frontend/src/components/inputListComponent/index.tsx @@ -1,9 +1,9 @@ -import { useEffect, useState, useContext } from "react"; +import { useContext, useEffect, useState } from "react"; import { InputListComponentType } from "../../types/components"; -import _, { set } from "lodash"; -import IconComponent from "../genericIconComponent"; +import _ from "lodash"; import { PopUpContext } from "../../contexts/popUpContext"; +import IconComponent from "../genericIconComponent"; export default function InputListComponent({ value, diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index 2bd35b40b..141cb8dfb 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -22,12 +22,12 @@ import { TableRow, } from "../../components/ui/table"; import { limitScrollFieldsModal } from "../../constants/constants"; +import { PopUpContext } from "../../contexts/popUpContext"; import { TabsContext } from "../../contexts/tabsContext"; import { typesContext } from "../../contexts/typesContext"; import { NodeDataType } from "../../types/flow"; import { classNames, getRandomKeyByssmm } from "../../utils/utils"; import BaseModal from "../baseModal"; -import { PopUpContext } from "../../contexts/popUpContext"; const EditNodeModal = forwardRef( ( @@ -75,7 +75,6 @@ const EditNodeModal = forwardRef( setCloseEdit(getRandomKeyByssmm().toString()); }, [modalOpen]); - return ( {children} diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx index a3b214c6b..df9d32f6d 100644 --- a/src/frontend/src/modals/genericModal/index.tsx +++ b/src/frontend/src/modals/genericModal/index.tsx @@ -97,10 +97,8 @@ export default function GenericModal({ }, [inputValue, type]); useEffect(() => { - setInputValue(value) - }, [value]) - - + setInputValue(value); + }, [value]); const coloredContent = (inputValue || "") .replace(/
- -
- -
-
+
+ +
+
-