@logickernel/bridge 0.9.2 → 0.9.4
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/next/components.cjs
CHANGED
|
@@ -1340,11 +1340,11 @@ function AppSidebar({
|
|
|
1340
1340
|
enabled: true
|
|
1341
1341
|
});
|
|
1342
1342
|
React2__namespace.useEffect(() => {
|
|
1343
|
-
if (process.env.NODE_ENV === "development") {
|
|
1343
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1344
1344
|
const orgIds = apiOrganizations.map((org) => org.id);
|
|
1345
1345
|
const pathOrgIdInList = pathOrgId ? apiOrganizations.some((org) => org.id === pathOrgId) : false;
|
|
1346
|
-
const computedCurrentOrgId = organizationId || (pathOrgId &&
|
|
1347
|
-
console.log("[AppSidebar] Navigation state:", {
|
|
1346
|
+
const computedCurrentOrgId = organizationId || (pathOrgId && (apiOrganizations.length === 0 || apiOrganizations.some((org) => org.id === pathOrgId)) ? pathOrgId : void 0) || (detectedOrgId && apiNavigationItems.length > 0 ? detectedOrgId : void 0);
|
|
1347
|
+
console.log("[AppSidebar] Navigation state (ENHANCED):", {
|
|
1348
1348
|
currentPathname,
|
|
1349
1349
|
pathOrgId,
|
|
1350
1350
|
organizationId,
|
|
@@ -1361,7 +1361,7 @@ function AppSidebar({
|
|
|
1361
1361
|
navigationUrl: detectedOrgId ? `${apiBaseUrl}/navigation/${detectedOrgId}` : "N/A"
|
|
1362
1362
|
});
|
|
1363
1363
|
}
|
|
1364
|
-
}, [currentPathname, pathOrgId, organizationId, detectedOrgId, apiBaseUrl, apiNavigationItems
|
|
1364
|
+
}, [currentPathname, pathOrgId, organizationId, detectedOrgId, apiBaseUrl, apiNavigationItems, apiOrganizations, navigationLoading, navigationError]);
|
|
1365
1365
|
const user = navigationUser || userProp;
|
|
1366
1366
|
const currentOrgId = organizationId || (pathOrgId && (apiOrganizations.length === 0 || apiOrganizations.some((org) => org.id === pathOrgId)) ? pathOrgId : void 0) || (detectedOrgId && apiNavigationItems.length > 0 ? detectedOrgId : void 0);
|
|
1367
1367
|
let navigationItems = apiNavigationItems;
|