From 2d8e9f2db0597d430dfcb50000fc997c3663b2e2 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Fri, 1 Dec 2023 15:22:18 +0300 Subject: [PATCH] apps/web: use items for Tabs component --- .../web/Components/Calculation/Form/index.jsx | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/apps/web/Components/Calculation/Form/index.jsx b/apps/web/Components/Calculation/Form/index.jsx index 5448eee..b9a85f7 100644 --- a/apps/web/Components/Calculation/Form/index.jsx +++ b/apps/web/Components/Calculation/Form/index.jsx @@ -45,19 +45,21 @@ const ComponentWrapper = styled.div` `; function Form({ prune }) { + const items = formTabs + .filter((tab) => !prune?.includes(tab.id)) + .map(({ id, title, Component }) => ({ + key: id, + label: title, + children: ( + + + + ), + })); + return ( - - {formTabs - .filter((tab) => !prune?.includes(tab.id)) - .map(({ id, title, Component }) => ( - - - - - - ))} - + ); }