@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.js
CHANGED
|
@@ -1311,11 +1311,11 @@ function AppSidebar({
|
|
|
1311
1311
|
enabled: true
|
|
1312
1312
|
});
|
|
1313
1313
|
React2.useEffect(() => {
|
|
1314
|
-
if (process.env.NODE_ENV === "development") {
|
|
1314
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1315
1315
|
const orgIds = apiOrganizations.map((org) => org.id);
|
|
1316
1316
|
const pathOrgIdInList = pathOrgId ? apiOrganizations.some((org) => org.id === pathOrgId) : false;
|
|
1317
1317
|
const computedCurrentOrgId = organizationId || (pathOrgId && (apiOrganizations.length === 0 || apiOrganizations.some((org) => org.id === pathOrgId)) ? pathOrgId : void 0) || (detectedOrgId && apiNavigationItems.length > 0 ? detectedOrgId : void 0);
|
|
1318
|
-
console.log("[AppSidebar] Navigation state:", {
|
|
1318
|
+
console.log("[AppSidebar] Navigation state (ENHANCED):", {
|
|
1319
1319
|
currentPathname,
|
|
1320
1320
|
pathOrgId,
|
|
1321
1321
|
organizationId,
|
|
@@ -1331,10 +1331,30 @@ function AppSidebar({
|
|
|
1331
1331
|
error: navigationError?.message,
|
|
1332
1332
|
navigationUrl: detectedOrgId ? `${apiBaseUrl}/navigation/${detectedOrgId}` : "N/A"
|
|
1333
1333
|
});
|
|
1334
|
+
console.log("[AppSidebar] KEY VALUES:", {
|
|
1335
|
+
"computedCurrentOrgId": computedCurrentOrgId,
|
|
1336
|
+
"apiNavigationItems.length": apiNavigationItems.length,
|
|
1337
|
+
"apiOrganizations.length": apiOrganizations.length,
|
|
1338
|
+
"pathOrgIdInList": pathOrgIdInList,
|
|
1339
|
+
"organizationIds": orgIds,
|
|
1340
|
+
"willDisplayItems": !!computedCurrentOrgId && apiNavigationItems.length > 0
|
|
1341
|
+
});
|
|
1334
1342
|
}
|
|
1335
|
-
}, [currentPathname, pathOrgId, organizationId, detectedOrgId, apiBaseUrl, apiNavigationItems
|
|
1343
|
+
}, [currentPathname, pathOrgId, organizationId, detectedOrgId, apiBaseUrl, apiNavigationItems, apiOrganizations, navigationLoading, navigationError]);
|
|
1336
1344
|
const user = navigationUser || userProp;
|
|
1337
1345
|
const currentOrgId = organizationId || (pathOrgId && (apiOrganizations.length === 0 || apiOrganizations.some((org) => org.id === pathOrgId)) ? pathOrgId : void 0) || (detectedOrgId && apiNavigationItems.length > 0 ? detectedOrgId : void 0);
|
|
1346
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1347
|
+
console.log("[AppSidebar] currentOrgId calculation:", {
|
|
1348
|
+
"organizationId prop": organizationId,
|
|
1349
|
+
"pathOrgId": pathOrgId,
|
|
1350
|
+
"detectedOrgId": detectedOrgId,
|
|
1351
|
+
"apiOrganizations.length": apiOrganizations.length,
|
|
1352
|
+
"apiNavigationItems.length": apiNavigationItems.length,
|
|
1353
|
+
"pathOrgIdInList": pathOrgId ? apiOrganizations.some((org) => org.id === pathOrgId) : false,
|
|
1354
|
+
"FINAL currentOrgId": currentOrgId,
|
|
1355
|
+
"willDisplayItems": !!currentOrgId && apiNavigationItems.length > 0
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1338
1358
|
let navigationItems = apiNavigationItems;
|
|
1339
1359
|
if (currentOrgId && navigationItems.length > 0) {
|
|
1340
1360
|
navigationItems = navigationItems.map((item) => ({
|