@pablozaiden/webapp 0.3.8 → 0.3.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pablozaiden/webapp",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Opinionated Bun + React webapp framework for single-server apps",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1112,6 +1112,7 @@ export function WebAppRoot({ appName, homeRoute, sidebar, routes, header, onRout
1112
1112
  ...augmented,
1113
1113
  ];
1114
1114
  }, [augmentPinningActions, baseNodes, currentPins, filteredNodes, pinningEnabled, sidebar.pinning, sidebarSearchActive]);
1115
+ const activeActionNodes = useMemo(() => augmentPinningActions(baseNodes), [augmentPinningActions, baseNodes]);
1115
1116
 
1116
1117
  useEffect(() => {
1117
1118
  if (!config?.currentUser) return;
@@ -1176,7 +1177,7 @@ export function WebAppRoot({ appName, homeRoute, sidebar, routes, header, onRout
1176
1177
  const topActions = sidebar.topActions?.slice(0, 2) ?? [];
1177
1178
  const defaultTitle = route.view === "settings" ? "Settings" : route.view === homeRoute.view ? appName : route.view.replace(/-/g, " ");
1178
1179
  const headerContext = { route, defaultTitle };
1179
- const activeSidebarNode = flattenSidebarItems(nodes).find((node) => routeMatches(node.route, route));
1180
+ const activeSidebarNode = flattenSidebarItems(activeActionNodes).find((node) => routeMatches(node.route, route));
1180
1181
  const activeSidebarActions = activeSidebarNode?.actions ?? [];
1181
1182
  const headerActions = [
1182
1183
  ...(header?.getActions?.(headerContext) ?? []),