mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-29 18:08:49 +00:00
limit NavBarButtons in js
This commit is contained in:
parent
45b472d7a1
commit
641335f752
1 changed files with 9 additions and 11 deletions
|
|
@ -25,17 +25,15 @@ const NavBar = React.memo(({ className, backButton = false, tabs = [], title = '
|
|||
}
|
||||
{
|
||||
Array.isArray(tabs) && tabs.length > 0 ?
|
||||
<div className={styles['nav-tabs-container']}>
|
||||
{tabs.map(({ href, icon, label }) => (
|
||||
<NavBarButton
|
||||
key={href}
|
||||
className={styles['nav-tab-button']}
|
||||
href={href}
|
||||
icon={icon}
|
||||
label={label}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
tabs.slice(0, 4).map(({ href, icon, label }) => (
|
||||
<NavBarButton
|
||||
key={href}
|
||||
className={styles['nav-tab-button']}
|
||||
href={href}
|
||||
icon={icon}
|
||||
label={label}
|
||||
/>
|
||||
))
|
||||
:
|
||||
<h2 className={styles['title']}>{title}</h2>
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue