From dff5c87c720fe2d52a46477bf0c6c640a3aed740 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 21 Jul 2023 11:17:13 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(components):=20remove=20unne?= =?UTF-8?q?cessary=20empty=20line=20in=20ToggleComponent=20=F0=9F=90=9B=20?= =?UTF-8?q?fix(modals):=20fix=20typo=20in=20comment=20in=20CodeAreaModal?= =?UTF-8?q?=20=F0=9F=90=9B=20fix(pages):=20remove=20unnecessary=20empty=20?= =?UTF-8?q?line=20in=20MainPage=20=F0=9F=90=9B=20fix(utils):=20remove=20un?= =?UTF-8?q?necessary=20semicolons=20in=20utils.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/components/toggleComponent/index.tsx | 1 - src/frontend/src/modals/codeAreaModal/index.tsx | 2 +- src/frontend/src/pages/MainPage/index.tsx | 2 +- src/frontend/src/utils/utils.ts | 8 ++++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/components/toggleComponent/index.tsx b/src/frontend/src/components/toggleComponent/index.tsx index ec0c8aab3..210c9223a 100644 --- a/src/frontend/src/components/toggleComponent/index.tsx +++ b/src/frontend/src/components/toggleComponent/index.tsx @@ -8,7 +8,6 @@ export default function ToggleComponent({ setEnabled, disabled, }: ToggleComponentType) { - // set component state as disabled useEffect(() => { if (disabled) { diff --git a/src/frontend/src/modals/codeAreaModal/index.tsx b/src/frontend/src/modals/codeAreaModal/index.tsx index deae92cbe..6e85b36e4 100644 --- a/src/frontend/src/modals/codeAreaModal/index.tsx +++ b/src/frontend/src/modals/codeAreaModal/index.tsx @@ -39,7 +39,7 @@ export default function CodeAreaModal({ } } - // Check for custom code errors + // Check for custom code errors function handleClick() { postValidateCode(code) .then((apiReturn) => { diff --git a/src/frontend/src/pages/MainPage/index.tsx b/src/frontend/src/pages/MainPage/index.tsx index f8e657da3..63be47718 100644 --- a/src/frontend/src/pages/MainPage/index.tsx +++ b/src/frontend/src/pages/MainPage/index.tsx @@ -8,7 +8,7 @@ import { TabsContext } from "../../contexts/tabsContext"; export default function HomePage() { const { flows, setTabId, downloadFlows, uploadFlows, addFlow, removeFlow } = useContext(TabsContext); - + // Set a null id useEffect(() => { setTabId(""); diff --git a/src/frontend/src/utils/utils.ts b/src/frontend/src/utils/utils.ts index a537dad37..f16ef4650 100644 --- a/src/frontend/src/utils/utils.ts +++ b/src/frontend/src/utils/utils.ts @@ -259,7 +259,7 @@ export function getRandomKeyByssmm(): string { export function varHighlightHTML({ name }: IVarHighlightType): string { const html = `{${name}}`; return html; -}; +} export function buildTweakObject(tweak) { tweak.forEach((el) => { @@ -331,7 +331,7 @@ def run_flow(inputs: dict, flow_id: str, tweaks: Optional[dict] = None) -> dict: # Setup any tweaks you want to apply to the flow inputs = ${inputs} print(run_flow(inputs, flow_id=FLOW_ID, tweaks=TWEAKS))`; -}; +} /** * Function to get the curl code for the API @@ -357,7 +357,7 @@ export function getCurlCode( ? buildTweakObject(tweak) : JSON.stringify(tweaks, null, 2) }}'`; -}; +} /** * Function to get the python code for the API @@ -382,4 +382,4 @@ flow = load_flow_from_json("${flowName}.json", tweaks=TWEAKS) # Now you can use it like any chain inputs = ${inputs} flow(inputs)`; -}; +}