🐛 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:
parent
032e48ac7f
commit
ca03da9ee2
1 changed files with 10 additions and 8 deletions
|
|
@ -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 = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue