diff --git a/src/frontend/src/modals/ApiModal/index.tsx b/src/frontend/src/modals/ApiModal/index.tsx index a86239baa..4cd90153c 100644 --- a/src/frontend/src/modals/ApiModal/index.tsx +++ b/src/frontend/src/modals/ApiModal/index.tsx @@ -62,6 +62,7 @@ const ApiModal = forwardRef( }, ref ) => { + const [activeTab, setActiveTab] = useState("0"); const [isCopied, setIsCopied] = useState(false); const [openAccordion, setOpenAccordion] = useState([]); @@ -114,17 +115,18 @@ const ApiModal = forwardRef( const t = buildTweaks(flow); tweak?.current?.push(t); } + + if (Object.keys(tweaksCode).length > 0) { + tabs.push({ + name: "Tweaks", + mode: "python", + image: "https://cdn-icons-png.flaticon.com/512/5968/5968350.png", + code: pythonCode, + }); + } }, []); - if (Object.keys(tweaksCode).length > 0) { - tabs.push({ - name: "Tweaks", - mode: "python", - image: "https://cdn-icons-png.flaticon.com/512/5968/5968350.png", - code: pythonCode, - }); - } function filterNodes() { let arrNodesWithValues = [];