From 590ab5135e1a14d03fe132b8cbd51af21b0df810 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sun, 23 Jun 2024 13:16:22 -0300 Subject: [PATCH] refactor: Update CodeTabsComponent to handle additional tabs This commit updates the CodeTabsComponent to handle an additional tab in the code tabs display. The previous implementation had a condition that checked if the active tab index was less than 4, but it has been updated to check if the active tab index is less than 5. This change ensures that the component can handle the new tab and display the corresponding content correctly. The code has been modified in the index.tsx file of the CodeTabsComponent directory. --- .../components/codeTabsComponent/index.tsx | 6 +- src/frontend/src/modals/apiModal/index.tsx | 55 ++++++++++++++----- .../src/modals/apiModal/utils/tabs-array.tsx | 13 ++++- 3 files changed, 54 insertions(+), 20 deletions(-) diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index 8b0106902..4b22ac11e 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -147,7 +147,7 @@ export default function CodeTabsComponent({ )} - {Number(activeTab) < 4 && ( + {Number(activeTab) < 5 && ( <>