l-min-components 1.7.1495 → 1.7.1496
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/package.json
CHANGED
|
@@ -203,10 +203,31 @@ const AppMainLayout = ({ children }) => {
|
|
|
203
203
|
|
|
204
204
|
if (!shouldSkipNavigation && defaultAccountType) {
|
|
205
205
|
const urlContainsAccountType = currentUrl.includes(defaultAccountType);
|
|
206
|
-
|
|
206
|
+
|
|
207
|
+
console.log(
|
|
208
|
+
{
|
|
209
|
+
currentUrl,
|
|
210
|
+
defaultAccountType,
|
|
211
|
+
urlContainsAccountType,
|
|
212
|
+
shouldSkipNavigation,
|
|
213
|
+
hostname: window.location.hostname,
|
|
214
|
+
},
|
|
215
|
+
"Navigation Debug"
|
|
216
|
+
);
|
|
207
217
|
|
|
208
218
|
if (!urlContainsAccountType) {
|
|
209
|
-
|
|
219
|
+
// Use setTimeout to ensure navigation happens after React Router is ready
|
|
220
|
+
setTimeout(() => {
|
|
221
|
+
const targetUrl = `/${defaultAccountType}`;
|
|
222
|
+
console.log(`Navigating to: ${targetUrl}`);
|
|
223
|
+
|
|
224
|
+
// Try using window.location.replace for staging compatibility
|
|
225
|
+
if (window.location.hostname.includes("staging")) {
|
|
226
|
+
window.location.replace(targetUrl);
|
|
227
|
+
} else {
|
|
228
|
+
window.location.href = targetUrl;
|
|
229
|
+
}
|
|
230
|
+
}, 100);
|
|
210
231
|
}
|
|
211
232
|
}
|
|
212
233
|
}
|