From efc88a7faeaf0ddcd687194acd4682ea25d2b0f6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Millet Date: Tue, 25 Jun 2024 14:32:42 +0200 Subject: [PATCH] put TabContent inside route --- .../components/tabsv2/Tabsv2.component.tsx | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/lib/components/tabsv2/Tabsv2.component.tsx b/src/lib/components/tabsv2/Tabsv2.component.tsx index 853f68ee70..cf7c99f6c4 100644 --- a/src/lib/components/tabsv2/Tabsv2.component.tsx +++ b/src/lib/components/tabsv2/Tabsv2.component.tsx @@ -219,34 +219,33 @@ function Tabs({ /> )} - - {filteredTabsChildren.map((tab, index) => ( - + + {filteredTabsChildren.map((tab, index) => ( + + {!tab.props.query || + (tab.props.query && matchQuery(tab.props.query)) ? ( - {!tab.props.query || - (tab.props.query && matchQuery(tab.props.query)) ? ( - tab.props.children - ) : ( - <> - )} + {tab.props.children} - - ))} - + ) : ( + <> + )} + + ))} );