Skip to content

Commit

Permalink
extract variable
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasFlaquer committed Sep 13, 2024
1 parent 25dcc03 commit ac24733
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/TabbedView/TabbedView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,15 @@ function TabbedView({
.replace(' ', '-')
.toLowerCase();

const quantityOfItems = Children.count(children);

return (
<>
<Navbar theme={theme} skin={skin} fluid={fluid}>
{Children.map(children, ({ props: { title, badge, icon } }) => (
<NavItem
fluid={fluid}
quantityOfItems={Children.count(children)}
quantityOfItems={quantityOfItems}
key={title}
onClick={() => handleTabClick(title)}
skin={skin}
Expand Down

0 comments on commit ac24733

Please sign in to comment.