@almadar/ui 5.9.9 → 5.9.10

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.
@@ -61932,11 +61932,13 @@ function OrbPreview({
61932
61932
  return match?.page.name;
61933
61933
  }, [pages, initialPagePath]);
61934
61934
  const [currentPage, setCurrentPage] = React98.useState(initialPageName);
61935
+ const prevInitialPagePathRef = React98.useRef(initialPagePath);
61935
61936
  React98.useEffect(() => {
61936
- if (initialPageName && initialPageName !== currentPage) {
61937
+ if (prevInitialPagePathRef.current !== initialPagePath) {
61938
+ prevInitialPagePathRef.current = initialPagePath;
61937
61939
  setCurrentPage(initialPageName);
61938
61940
  }
61939
- }, [initialPageName, currentPage]);
61941
+ }, [initialPagePath, initialPageName]);
61940
61942
  const handleNavigate = React98.useCallback((path) => {
61941
61943
  const match = pages.find(({ page }) => page.path === path);
61942
61944
  navLog.debug("handleNavigate", () => ({
package/dist/avl/index.js CHANGED
@@ -61883,11 +61883,13 @@ function OrbPreview({
61883
61883
  return match?.page.name;
61884
61884
  }, [pages, initialPagePath]);
61885
61885
  const [currentPage, setCurrentPage] = useState(initialPageName);
61886
+ const prevInitialPagePathRef = useRef(initialPagePath);
61886
61887
  useEffect(() => {
61887
- if (initialPageName && initialPageName !== currentPage) {
61888
+ if (prevInitialPagePathRef.current !== initialPagePath) {
61889
+ prevInitialPagePathRef.current = initialPagePath;
61888
61890
  setCurrentPage(initialPageName);
61889
61891
  }
61890
- }, [initialPageName, currentPage]);
61892
+ }, [initialPagePath, initialPageName]);
61891
61893
  const handleNavigate = useCallback((path) => {
61892
61894
  const match = pages.find(({ page }) => page.path === path);
61893
61895
  navLog.debug("handleNavigate", () => ({
@@ -49611,11 +49611,13 @@ function OrbPreview({
49611
49611
  return match?.page.name;
49612
49612
  }, [pages, initialPagePath]);
49613
49613
  const [currentPage, setCurrentPage] = React85.useState(initialPageName);
49614
+ const prevInitialPagePathRef = React85.useRef(initialPagePath);
49614
49615
  React85.useEffect(() => {
49615
- if (initialPageName && initialPageName !== currentPage) {
49616
+ if (prevInitialPagePathRef.current !== initialPagePath) {
49617
+ prevInitialPagePathRef.current = initialPagePath;
49616
49618
  setCurrentPage(initialPageName);
49617
49619
  }
49618
- }, [initialPageName, currentPage]);
49620
+ }, [initialPagePath, initialPageName]);
49619
49621
  const handleNavigate = React85.useCallback((path) => {
49620
49622
  const match = pages.find(({ page }) => page.path === path);
49621
49623
  navLog.debug("handleNavigate", () => ({
@@ -49562,11 +49562,13 @@ function OrbPreview({
49562
49562
  return match?.page.name;
49563
49563
  }, [pages, initialPagePath]);
49564
49564
  const [currentPage, setCurrentPage] = useState(initialPageName);
49565
+ const prevInitialPagePathRef = useRef(initialPagePath);
49565
49566
  useEffect(() => {
49566
- if (initialPageName && initialPageName !== currentPage) {
49567
+ if (prevInitialPagePathRef.current !== initialPagePath) {
49568
+ prevInitialPagePathRef.current = initialPagePath;
49567
49569
  setCurrentPage(initialPageName);
49568
49570
  }
49569
- }, [initialPageName, currentPage]);
49571
+ }, [initialPagePath, initialPageName]);
49570
49572
  const handleNavigate = useCallback((path) => {
49571
49573
  const match = pages.find(({ page }) => page.path === path);
49572
49574
  navLog.debug("handleNavigate", () => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.9.9",
3
+ "version": "5.9.10",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [