🐛 fix(ApiModal/index.tsx): remove unnecessary empty line

 feat(ApiModal/index.tsx): add support for displaying tweaks code in a new tab if tweaksCode object is not empty
This commit is contained in:
Cristhian Zanforlin Lousa 2023-07-14 12:03:23 -03:00
commit ca03da9ee2

View file

@ -62,6 +62,7 @@ const ApiModal = forwardRef(
},
ref
) => {
const [activeTab, setActiveTab] = useState("0");
const [isCopied, setIsCopied] = useState<Boolean>(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 = [];