@sudobility/building_blocks 0.0.146 → 0.0.147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -252,16 +252,20 @@ const AppTopBar = ({
252
252
  () => menuItems.filter((item) => item.show !== false),
253
253
  [menuItems]
254
254
  );
255
- const navItems = useMemo(
256
- () => visibleMenuItems.map((item) => ({
257
- id: item.id,
258
- label: item.label,
259
- icon: item.icon,
260
- href: item.href,
261
- className: item.className
262
- })),
263
- [visibleMenuItems]
264
- );
255
+ const navItems = useMemo(() => {
256
+ const mapItem = (item) => {
257
+ var _a;
258
+ return {
259
+ id: item.id,
260
+ label: item.label,
261
+ icon: item.icon,
262
+ href: item.href,
263
+ className: item.className,
264
+ children: (_a = item.children) == null ? void 0 : _a.filter((child) => child.show !== false).map(mapItem)
265
+ };
266
+ };
267
+ return visibleMenuItems.map(mapItem);
268
+ }, [visibleMenuItems]);
265
269
  const LinkWrapper = useMemo(
266
270
  () => ({ href, className: className2, children }) => /* @__PURE__ */ jsx(LinkComponent, { href, className: className2, children }),
267
271
  [LinkComponent]