Commit 93195fac by Peter Holmberg Committed by GitHub

Fix: Reimplement HideFromTabs in Tabs component (#21863)

* reimplement hidefromtabs

* remove console log

* going with option b instead

* less explicit
parent c140d110
...@@ -60,13 +60,15 @@ const Navigation = ({ main }: { main: NavModelItem }) => { ...@@ -60,13 +60,15 @@ const Navigation = ({ main }: { main: NavModelItem }) => {
<TabsBar className="page-header__tabs" hideBorder={true}> <TabsBar className="page-header__tabs" hideBorder={true}>
{main.children.map((child, index) => { {main.children.map((child, index) => {
return ( return (
<Tab !child.hideFromTabs && (
label={child.text} <Tab
active={child.active} label={child.text}
key={`${child.url}-${index}`} active={child.active}
icon={child.icon} key={`${child.url}-${index}`}
onChangeTab={() => goToUrl(index)} icon={child.icon}
/> onChangeTab={() => goToUrl(index)}
/>
)
); );
})} })}
</TabsBar> </TabsBar>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment