@logickernel/bridge 0.9.3 → 0.9.5
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
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:", {
|
|
1347
|
+
console.log("[AppSidebar] Navigation state (ENHANCED):", {
|
|
1348
1348
|
currentPathname,
|
|
1349
1349
|
pathOrgId,
|
|
1350
1350
|
organizationId,
|
|
@@ -1360,10 +1360,30 @@ function AppSidebar({
|
|
|
1360
1360
|
error: navigationError?.message,
|
|
1361
1361
|
navigationUrl: detectedOrgId ? `${apiBaseUrl}/navigation/${detectedOrgId}` : "N/A"
|
|
1362
1362
|
});
|
|
1363
|
+
console.log("[AppSidebar] KEY VALUES:", {
|
|
1364
|
+
"computedCurrentOrgId": computedCurrentOrgId,
|
|
1365
|
+
"apiNavigationItems.length": apiNavigationItems.length,
|
|
1366
|
+
"apiOrganizations.length": apiOrganizations.length,
|
|
1367
|
+
"pathOrgIdInList": pathOrgIdInList,
|
|
1368
|
+
"organizationIds": orgIds,
|
|
1369
|
+
"willDisplayItems": !!computedCurrentOrgId && apiNavigationItems.length > 0
|
|
1370
|
+
});
|
|
1363
1371
|
}
|
|
1364
|
-
}, [currentPathname, pathOrgId, organizationId, detectedOrgId, apiBaseUrl, apiNavigationItems
|
|
1372
|
+
}, [currentPathname, pathOrgId, organizationId, detectedOrgId, apiBaseUrl, apiNavigationItems, apiOrganizations, navigationLoading, navigationError]);
|
|
1365
1373
|
const user = navigationUser || userProp;
|
|
1366
1374
|
const currentOrgId = organizationId || (pathOrgId && (apiOrganizations.length === 0 || apiOrganizations.some((org) => org.id === pathOrgId)) ? pathOrgId : void 0) || (detectedOrgId && apiNavigationItems.length > 0 ? detectedOrgId : void 0);
|
|
1375
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1376
|
+
console.log("[AppSidebar] currentOrgId calculation:", {
|
|
1377
|
+
"organizationId prop": organizationId,
|
|
1378
|
+
"pathOrgId": pathOrgId,
|
|
1379
|
+
"detectedOrgId": detectedOrgId,
|
|
1380
|
+
"apiOrganizations.length": apiOrganizations.length,
|
|
1381
|
+
"apiNavigationItems.length": apiNavigationItems.length,
|
|
1382
|
+
"pathOrgIdInList": pathOrgId ? apiOrganizations.some((org) => org.id === pathOrgId) : false,
|
|
1383
|
+
"FINAL currentOrgId": currentOrgId,
|
|
1384
|
+
"willDisplayItems": !!currentOrgId && apiNavigationItems.length > 0
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1367
1387
|
let navigationItems = apiNavigationItems;
|
|
1368
1388
|
if (currentOrgId && navigationItems.length > 0) {
|
|
1369
1389
|
navigationItems = navigationItems.map((item) => ({
|