🐛 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 ref
) => { ) => {
const [activeTab, setActiveTab] = useState("0"); const [activeTab, setActiveTab] = useState("0");
const [isCopied, setIsCopied] = useState<Boolean>(false); const [isCopied, setIsCopied] = useState<Boolean>(false);
const [openAccordion, setOpenAccordion] = useState([]); const [openAccordion, setOpenAccordion] = useState([]);
@ -115,8 +116,6 @@ const ApiModal = forwardRef(
tweak?.current?.push(t); tweak?.current?.push(t);
} }
}, []);
if (Object.keys(tweaksCode).length > 0) { if (Object.keys(tweaksCode).length > 0) {
tabs.push({ tabs.push({
name: "Tweaks", name: "Tweaks",
@ -126,6 +125,9 @@ const ApiModal = forwardRef(
}); });
} }
}, []);
function filterNodes() { function filterNodes() {
let arrNodesWithValues = []; let arrNodesWithValues = [];