@hai3/react 0.2.0-alpha.0 → 0.2.0-alpha.1

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
@@ -5698,17 +5698,11 @@ function useNavigation() {
5698
5698
  },
5699
5699
  [app.actions]
5700
5700
  );
5701
- const getCurrentScreenset = () => {
5702
- if (typeof window === "undefined") return null;
5703
- const parts = window.location.pathname.split("/").filter(Boolean);
5704
- const screenId = parts[0];
5705
- if (!screenId) return null;
5706
- return app.routeRegistry?.getScreensetForScreen(screenId) ?? null;
5707
- };
5701
+ const currentScreenset = currentScreen ? app.routeRegistry?.getScreensetForScreen(currentScreen) ?? null : null;
5708
5702
  return {
5709
5703
  navigateToScreen: navigateToScreen2,
5710
5704
  navigateToScreenset,
5711
- currentScreenset: getCurrentScreenset(),
5705
+ currentScreenset,
5712
5706
  currentScreen
5713
5707
  };
5714
5708
  }