From 9952d160715f1eeb7de8af6876fd818774ec6260 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Tue, 2 Apr 2024 02:24:22 +0200 Subject: [PATCH] Remove dead code at API Modal --- src/frontend/src/modals/ApiModal/index.tsx | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/frontend/src/modals/ApiModal/index.tsx b/src/frontend/src/modals/ApiModal/index.tsx index 579a53591..9e847aae5 100644 --- a/src/frontend/src/modals/ApiModal/index.tsx +++ b/src/frontend/src/modals/ApiModal/index.tsx @@ -50,14 +50,9 @@ const ApiModal = forwardRef( const tweaksList = useRef([]); const [getTweak, setTweak] = useState([]); const flowState = useFlowStore((state) => state.flowState); - const pythonApiCode = getPythonApiCode( - flow, - autoLogin, - tweak.current, - flowState - ); - const curl_code = getCurlCode(flow, autoLogin, tweak.current, flowState); - const pythonCode = getPythonCode(flow, tweak.current, flowState); + const pythonApiCode = getPythonApiCode(flow, autoLogin, tweak.current); + const curl_code = getCurlCode(flow, autoLogin, tweak.current); + const pythonCode = getPythonCode(flow, tweak.current); const widgetCode = getWidgetCode(flow, autoLogin, flowState); const tweaksCode = buildTweaks(flow); const codesArray = [ @@ -168,14 +163,9 @@ const ApiModal = forwardRef( tweak.current.push(newTweak); } - const pythonApiCode = getPythonApiCode( - flow, - autoLogin, - tweak.current, - flowState - ); - const curl_code = getCurlCode(flow, autoLogin, tweak.current, flowState); - const pythonCode = getPythonCode(flow, tweak.current, flowState); + const pythonApiCode = getPythonApiCode(flow, autoLogin, tweak.current); + const curl_code = getCurlCode(flow, autoLogin, tweak.current); + const pythonCode = getPythonCode(flow, tweak.current); const widgetCode = getWidgetCode(flow, autoLogin, flowState); tabs![0].code = curl_code;