Forráskód Böngészése

Reimplement children manipulation in Navbar

Tatiana Inama 7 éve
szülő
commit
2ea0443836
1 módosított fájl, 1 hozzáadás és 5 törlés
  1. 1 5
      recipes/src/components/Navbar/index.tsx

+ 1 - 5
recipes/src/components/Navbar/index.tsx

@@ -30,11 +30,7 @@ export default function Navbar(props: NavbarProps){
       }
       <div className={`cbk-navbar__content ${props.contentClassName||''}`}>
         {
-          props.children && (
-            props.children.map(child => (
-              child
-            ))
-          )
+          props.children && React.Children.map(props.children, child => child )
         }
       </div>
     </div>